How to convert an image to ETC2 format? (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 ETC2 --texture-format ktx2The pixel format specifies the compression algorithm to use, the texture format describes the file container. The following formats are supported for ETC:
| Pixel format | Bits per pixel | Description |
|---|---|---|
ETC1_RGB | 4 | ETC1 compression, no alpha channel |
ETC1_A | 4 | ETC1 compression, alpha channel only |
ETC2_RGB | 4 | ETC2 compression, no alpha |
ETC2_RGBA | 8 | ETC2 compression, color+alpha |
| Texture Format | Description |
|---|---|
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. |
pkm | ETC texture container. Simple format for ETC1/ETC2 compressed textures. |
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. |
The Image quality
can be configured with --etc1-quality <0-100> and --etc2-quality <0-100>, default value is 70.
For other options (scaling, trimming transparency, ...) have a look at the
Image conversion documentation.