Bunnylin's Chromaticity Compressor

1.19 02-May-2017

This free and open-source program takes an image with lots of different colors, and momentarily returns the image with far fewer colors, but still looking almost as good. This is called color quantisation.

There is another, more famous free utility that has similar features – ImageMagick. You may want to give it a try.

BunComp is particularly useful for webcomics – you naturally create the original comic page in 24-bit color, maybe with alpha effects to make it more three-dimensional, but when actually putting it on a website, you may prefer to downgrade the image to a lower resolution and with a reduced palette, to optimise file size while retaining optimal quality. This program allocates the picture's palette for least visual degradation, and can use different dithering techniques to minimise perceived quality loss, while auto-detecting and exactly preserving flat colors, such as sprite character skin or clothes.

BunComp can also be a useful tool for converting graphics resources to be used with game engines that require specific palette indices – you can override the color reduction algorithm by selecting preset colors, which will be preserved exactly at the indicated indices. The alpha channel can be squeezed into the palette as well, if your sprites need it.

The algorithm uses an optimised brute force approach to achieve excellent perceived quality at the cost of processing speed. My subjective quality comparisons suggest this algorithm produces better results than any old Median Cut or Octree implementations, is at about par with the renowned NeuQuant algorithm, and fails to match the quality of Spatial Color Quantisation. However, I have completed a partial rewrite of my algorithm, and it is even better now; but the new version is not quite ready for release yet.