Imagination PowerVR SDK Blog

How to Call the Transcode() to delete alpha Channel ?



I called the Function “Transcode()”, set the parameter “const PixelType ptFormat” is “ePVRTPF_PVRTCI_2bpp_RGB” / "ePVRTPF_PVRTCI_2bpp_RGBA"

But their results seem to have no difference in the “PVRTexTool”.

In the Texture Information, Format Both are PVRTC 2bpp.

In the Display Options -> Colour, There are alpha channel all. why also have the alpha channel when use the parameter " ePVRTPF_PVRTCI_2bpp_RGB " ?


My codes is :

// want to delete alpha Channel, but Failed

Transcode( cTexture, ePVRTPF_PVRTCI_2bpp_RGB, ePVRTVarTypeUnsignedByteNorm, ePVRTCSpacelRGB);

// successful

Transcode( cTexture, ePVRTPF_PVRTCI_2bpp_RGBA, ePVRTVarTypeUnsignedByteNorm, ePVRTCSpacelRGB);


Hi Liumazi,

Essentially the “alpha” channel was just a hint to our older hardware to say whether alpha is likely to be present or not, but this doesn’t really make a difference any more (In the GUI, the two are no longer distinguished). If you want to empty the alpha channel you should use the “SetChannels” function, to set the float value of the alpha channel to 1.0 globally.

However, saying that, I have had a request for this behaviour before, so I will add it for the 3.3 release of our SDK.