Transcode PVR back to RGBA

This topic contains 2 replies, has 2 voices, and was last updated by  swashburn3 5 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30818

    swashburn3
    Member

    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

    #35701

    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

    #35702

    swashburn3
    Member

    Thanks Tobias! That’s what I needed

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.