This repository is now deprectated. Use toktx from KTX-Software to compress images into ktx astc with mipmaps.
toktx --encode astc --astc_blk_d 6x6 --astc_mode ldr --genmipmap output.ktx input[s].png
KTX-creator can help you to compressing and packing images into a KTX texture. It supports automatic mipmaps generation and Adaptive Scalable Texture Compression (ASTC).
You just need to initialize them.
git submodule init
git submodule update
ASTC encoding library [github]
Khronos KTX library [github]
ImageMagick library with CMake support [github]
Test framework for unit-tests [github]
cmake -H. -Bbuild
cmake --build build
You can pack an image into a KTX (background.ktx
) file by running:
ktx-creator background.png
You can specify the compression you want to apply on the image before packing it into a KTX file specifying -c <compression>
. The following command will compress the png image using ASTC for you.
ktx-creator -c astc background.png
You can tell ktx-creator to generate mipmaps by passing -mipmaps
on the command line interface. This command, for example, will generate the mipmaps, will compress them, and will pack them into a KTX file.
ktx-creator -mipmaps -c astc background.png
See LICENSE.
This project has some third-party dependencies, each of which may have independent licensing:
- astc-encoder: ASTC Evaluation Codec
- KTX-Software: Khronos Texture Library and Tools
- catch2: Testing framework
- stb: Single-file public domain (or MIT licensed) libraries
- ImageMagick ImageMagick library