Imagination PowerVR SDK Blog

Transcode PVR back to RGBA


#1

Hi! I’d like to be able to Transcode a PVR back to an RGBA texture and get a pointer to the bits in order to make a PNG that we can give to the artists to subjectively check compression quality.





I can’t seem to figure out the arguments to give to the Transcode function to tell it to do this. Also, I’m not sure how to get the array back from the Texture object.





Can someone help?





Thanks!





Samswashburn32012-04-07 05:46:29


#2

Hi Sam,

The transcode function works both ways - it encodes and decodes. So to get the data back in RGBA format just call the function again with the original pixel type (completely uncompressed is generally “PVRStandard8PixelType”, “ePVRTVarTypeUnsignedByteNorm” and “ePVRTCSpacelRGB”). This should give you an image in a standard bitmap format to check quality.

To get the texture data itself - call “getDataPtr()” which will provide a pointer to the specified surface if arguments are provided, or to the start of the texture data if not.

Thanks,

Tobias




#3

Thanks Tobias! That’s what I needed