Tile-based Image Quantization Tool
This project supersedes the older tilequant tool.
This tool is mostly meant for GBA/NDS graphics, where each 'tile' can use one of many palettes. However, it can be adapted to just about any use (for example, custom formats).
Run make
to build the tool and dynamic interface (.dll or .so, depending on the platform), then call qualetize Input.bmp Output.bmp -npal:(no. of palettes) -cols:(entries/palette)
(eg. qualetize Input.bmp Output.bmp -npal:16 -cols:16
to use all sixteen 16-colour GBA palettes).
There are a lot of supported options (eg. dithering options, colourspaces, etc.); run qualetize
without any arguments for full dcoumentation.
Note that the dynamic library will potentially export many "internal" functions. If someone comes up with a clean way to only export the Qualetize()
function from Qualetize.c, a PR would be greatly appreciated.
- Banding artifacts can be pretty rough around tile boundaries. This can be partially alleviated by matching
-ditherin:
with-ditherout:
, but this may not be ideal. - Tiles with just one or two colours may separate into a completely separate palette, even when they could be merged into another with no PSNR loss.
All conversions performed using default settings plus -ditherin:floyd
and -npal:X
.
Palettes | Result |
---|---|
Baseline truth | |
-npal:1 |
|
-npal:2 |
|
-npal:4 |
|
-npal:8 |
|
-npal:16 |
- Ruben Nunez - Initial work - Aikku93
- Marco Köpcke - Modifications and motivation for DLL interface - Parakoopa
- zvezdochiot - Code and git cleanup - zvezdochiot