img2ktx is a simple command-line utility.
It currently runs on Windows, Linux and MacOS. Use CMake to generate a project file for your platform.
It loads images with stb_image. Supported formats include JPEG, PNG, BMP, TGA, GIF, etc.
It optionally generates mipmap chains with stb_image_resize.
It compresses the mipmaps to BC1, BC3, BC7, ETC1, or ASTC with Intel's ISPC Texture Compressor. It can also output uncompressed 32-bit RGBA images. Only the Windows ispc_texcomp library is included in the repo; users on other platforms must provide their own.
It writes the compressed images to a KTX file. If more than one image is provided with identical dimensions, the output KTX file can be either a 2D texture array or a cubemap.
Download pre-built binaries from the Releases page.
It may eventually do the following things as well:
- Output DDS files, because inevitably somebody is going to ask for it.
- Convert animated GIFs directly into array textures, because what 3D graphics application isn't improved by animated GIFs?
- Run as a web server, with CGI and XMLRPC interfaces.