Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 2.08 KB

README.md

File metadata and controls

37 lines (26 loc) · 2.08 KB

Qualetize

Tile-based Image Quantization Tool

This project supersedes the older tilequant tool.

Purpose

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).

Getting started

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.

Possible issues/todo

  • 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.

Examples

All conversions performed using default settings plus -ditherin:floyd and -npal:X.

Palettes Result
Baseline truth Baseline truth
-npal:1 1 palette
-npal:2 2 palettes
-npal:4 4 palettes
-npal:8 8 palettes
-npal:16 16 palettes

Authors

  • Ruben Nunez - Initial work - Aikku93
  • Marco Köpcke - Modifications and motivation for DLL interface - Parakoopa
  • zvezdochiot - Code and git cleanup - zvezdochiot