Imagination PowerVR SDK Blog

PVRTexToolCLI Raw Data Wrapping



Hi, I have successfully managed to wrap some raw textures to the PVRTC 4BPP format using the GUI. However I am having some trouble locating the same function in the CLI version of PVRTexTool. Because the texture data is raw, I am unable to specify any of the file formats mentioned in the input tooltip (KTX, DDS etc).

I require the use of the CLI interface to batch automate some conversion processes.

Assistance and input is greatly appreciated :slight_smile:


Hi Henry,

Unfortunately, this functionality only exists in the GUI tool. We could add an interface to the command line, but I suspect it would be quite unwieldy. I would recommend generating a TGA or BMP header for your raw data.

Hope this helps,


Actually it would be a great help if the command line could include that feature as I can’t find any other software that offers the same wrapping feature that PVRTexTool has. I initially thought that the GUI was built around the CLI as if it were a wrapper. I don’t work with image formats much unfortunately, so I don’t really know how I’m supposed to go about with generating those headers.


Does the CLI version support PNM file formats? They might be a compromise solution as the headers for those are utterly trivial. For example, they can be produced with a single printf in C, and then the raw RGB data is simply concatenated.


[blockquote]Does the CLI version support PNM file formats?[/blockquote]
Not yet. I’ve filed BRN58174 for the suggestion to support PNM, Seems like a neat way to quickly wrap raw data.

[blockquote]initially thought that the GUI was built around the CLI as if it were a wrapper[/blockquote]
Most of the functionality comes from the PVRTexTool library. Unfortunately though, there are some features that are GUI specific.

I haven’t used it before, but this free to use library has a very clean API for generating TGA files:


I’ve did some analysis on the raw compressed texture and the wrapped texture. It seems like the GUI just generates a proper PVR header for the texture to be readable. I’ll try a quick hack to see if I can discard the existing unknown header and generate one based on the whitepaper for the PVR format.

Thanks for the input so far, learning new things :slight_smile: