Convert png and jpg to PVR format

Hi there,
I am trying to use the PVRTexToolCLI.exe tool to convert image to PVR format.

So I tried to use PVRTexToolGUI.exe to open a jpg or a png file then everything works fine.

But when I try to use the PVRTexToolCLI.exe then it fails. the error message is " Unable to load file 1.jpg - invalid file "

so every time the jpg file which has the dpi = 96 it fails, if dpi=72 then it works fine.

Also the output pvr file from GUI is always bigger than the cmd output.

so what kind of setting flags or options should i use then i can get a good result.

So far i just tried “PVRTexToolCLI.exe -i 1.jpg -o 0xxx.pvr -f PVRTC1_4”

i tried all the prv formats: PVRTC1_2, PVRTC1_4, PVRTC1_2_RGB, PVRTC1_4_RGB, PVRTC2_2, PVRTC2_4
none of them has the same size from GUI convert.

So questions are:

  1. why the jpg which has dpi=96 fails on the CLI.exe. but the gui.exe works fine.
  2. how to get a good result of PVR output?

Thanks a lot!

Hi,

This is very strange because both the GUI and the command-line use exactly the same library for uncompressing jpgs. I have created myself a jpg with dpi=96 (using Photoshop) and it seems to work fine both in the GUI and CLI. I think the problem might be an slightly error in the original jpg that confuses the uncompressor. Sometimes goes one way sometimes go another. Which application you use to generate the jpgs? Could you attach a small example that breaks?

Thanks.

Carlos.

sorry i am still a new user, so cannot upload the file.
i have think link with a zip file to make sure the jpg is not been messed up.
https://pan.baidu.com/s/10VvkKEj3IgzQ83FLdAaIJQ
please see if this works. and this jpg is not working with CLI.exe for sure.
and this is not a special case in my side.
I can get a lot more jpgs. i think


press 下载 to download

Hi,

Baidu requires registration and I do not have an account. You should be able to attach it using the button at the top of the edition page. Anyway, if you still have problems attaching it to the forum, maybe you can send it to us using our developer ticketing system here: https://pvrsupport.imgtec.com/

Thanks

Carlos.