Imagination PowerVR SDK Blog

saveFileLegacyPVR with L8 format returns false

pvrtextool

#1

Hi,

I want to write a PVR version 2 file with L8 format.
I found that 0x43 L8 is available in the legacy specification but it returns false.

I used pvrtexture::PixelType(‘l’,0 ,0 ,0 ,8,0,0,0) format to set the format of the texture.

Is it actually unsupported format?

Thanks,
Anoop


#2

Hi Annop,

That format should be supported.

Could you let us know what version of the SDK you are working with, and give us a sample of your code that’s giving an unexpected result?

If the code contains confidential information, you can share it privately with us by creating a new ticket on our support system: pvrsupport.imgtec.com/new-ticket


#3

Hi Paul,
I am using SDK version 3.3.
Easiest way to reproduce this issue is by opening the attached image file from PVRTexTool GUI.
Encode it with OpenGLES2 L8 format.
Save the file using “Save as Legacy” option.

We will get an unknown error saying
"An unknown error has occurred, please try a different texture file type, or contact DevTech for support".
In the code also it may be returning false because of this error.
I think it is not only with L8, but for some other formats also same error.
RGBA8888,RGB888 and A8 doesn’t give any error.

Thanks,
Anoop


#4

It looks like there is a bug with that specific format, because it’s a legacy format it’s unlikely to be fixed.

However, a possible workaround for you should be to use the PVRTexTool command line interface, and output to i8 instead, which should actually give your the same L8 format.

PVRTexToolCLI -i saveFIleLegacyPVR.png -legacypvr -f i8,UBN,lRGB