I have around 2000 PVRTC
graphics which are used to make a bigger image by combining them. To process this with my script, I need to convert this graphics into TGA
or PNG
format but keeping the original filenames. I know that PVRTexTool can convert it by saving images as a new type, but manual processing of 2000 graphics is impossible. Is there a way to convert multiple PVRTC
graphics at once?

- 794
- 1
- 9
- 34
-
I was hoping to suggest you could use the command line version - as I was assuming it had a "decompress" mode - but it doesn't seem to allow it. The SDK, however, does include C++ code to do decompression if you are keen to roll your own tool. Having said that, what do you want to do with the larger "atlas" image file after decompression and combining. Is it just to view them, or do you want to re-compress the result? If so, it may be possible to "assemble" the compressed pieces (with appropriate "padding"). – Simon F Oct 12 '15 at 11:46
-
@SimonF thank you for your comment. Combined images (creating map or "atlas") i am going to use to locate different objects from game by their coordinates. I've been able to convert a single image with TexturePacker (oddly image size became 516x516 from 512x512) by using command line commands from this [tutorial](http://juzhax.com/2014/08/how-to-convert-pvr-czz-file-to-png/), however I wasnt able to do multiple conversion since windows doesnt have implementation of `sed` and `xargs`. In case you could write this for windows command line, it would be amazing – lolbas Oct 12 '15 at 12:53
1 Answers
An answer that's an update to my comment above, kindly supplied by a colleague:
With a bit of coaxing, the command line tool, PVRTexToolCLI.exe will do the decompression. Assuming your input PVRTC file is ABC.pvr (it might also work with .dds but I've not tried), and you want to decompress to ABC.png, use
PVRTexToolCLI -f R8G8B8A8 -d ABC.png -i ABC.pvr
It seems it also produces an extra .pvr file (probably ABC.Out.pvr) so just delete these afterwards.
How you create the script to do all of them is up to you but perhaps you could use cygwin.
You also mentioned "...with TexturePacker (oddly image size became 516x516 from 512x512)".
By coincidence, I asked almost the same question to Andreas Loew. He said that a 2 pixel border is placed around all the images and so if there's only one and, I guess, it's completely opaque, it'll become 4 pixels taller and wider.
Finally - and excuse the blatant plug - you might be better off asking this sort of question on the PowerVR Insider forum. :-)

- 1,036
- 8
- 23