How to convert an image to PVRTC format? (PVR or KTX file)
With TexturePacker's --convert-texture command line option you can easily convert a single image to a different format:
TexturePacker --convert-texture input.png \
--pixel-format PVRTCII_4BPP --texture-format pvr3The pixel format specifies the compression algorithm to use, the texture format describes the file container. The following formats are supported for PVRTC compression:
| Pixel format | Bits per pixel | Description |
|---|---|---|
PVRTCI_2BPP_RGBA | 2 | PVRTC compression, 2bit per pixel |
PVRTCI_4BPP_RGBA | 4 | PVRTC compression, 4bit per pixel |
PVRTCI_2BPP_RGB | 2 | PVRTC compression, 2bit per pixel, no transparency |
PVRTCI_4BPP_RGB | 4 | PVRTC compression, 4bit per pixel, no transparency |
PVRTCII_2BPP | 2 | PVRTC2 compression, 2bit per pixel |
PVRTCII_4BPP | 4 | PVRTC2 compression, 4bit per pixel |
| Texture Format | Description |
|---|---|
pvr3 | PowerVR Texture Format. Native format for iOS and PowerVR GPUs. |
pvr3gz | PowerVR Texture Format, compressed with gzip. Smaller on disk, decompressed at load time. |
pvr3ccz | PowerVR Texture Format, compressed with zlib, cocos2d header. |
ktx | Khronos Texture. Standard container for OpenGL ES textures. |
ktx2 | Khronos Texture (Version 2). Newer format with Basis Universal support. |
zktx | Khronos Texture (gzip compressed). KTX file compressed for smaller storage. |
The Image quality
can be configured with --pvr-quality <0-7>, default value is 3.
For other options (scaling, trimming transparency, ...) have a look at the
Image conversion documentation.