Creating new compressed textures on the fly and storing as PNG
I need to compress an RGBA32 texture on the fly into multiple different compression formats and calculate their PSNRs (peak signal-to-noise ratio) from their original. The PSNR calculations require GetPixels() to work on the compressed textures, so I thought I'd convert these compressed textures back to RBGA32 so I can also store them as PNG for use in some documents in which I need to compare qualities.
I can't seem to get the compression itself to work using EditorUtility.CompressTexture() as that may only be used in an AssetPostprocessor script within the OnPosprocessTexture method.
Is what I want even possible in Unity? And how?
Otherwise, I may need an external tool that may compress textures in a multitude of textures. Any recomendations with regards to such tools?