pornel/pngquant — pull request #54 by vmdanilov (2013-10-05 10:29:28+00:00)
Title: Improve FS dithering

Current implementation of FS dithering introduces slight color shift on solid palette colors, e.g. solid gray on images from #40 changes from rgb(198, 198, 198) to rgb(199, 199, 199). In addition, small error keeps accumulating on the solid colors which results in some unnecessary dither there.

This pull request resolves those major issues, issue #50 in particular.

Note: it's possible to mark the solid colors in the dither map, though in my tests a simple raise of the noticeable error threshold worked fine. Further testing needed.

What do you think about further improvements?
- Remove redundant ordered dithering [lib/libimagequant.c](https://github.com/pornel/pngquant/blob/master/lib/libimagequant.c#L921)
- Replace current solution for error limiting with something similar to [GNOME/gimp/app/core/gimpimage-convert-type.c](https://github.com/GNOME/gimp/blob/master/app/core/gimpimage-convert-type.c#L3577)