Adrien Destugues 0236d5342a Rework the color reduction algorithm:
* Split clusters according to their volume (narrow covering) instead of occurence count. This ensures clusters representating a lot 
of colors are split; and a lot of pixels with near colors are grouped together, which is what we want for low-color work.
 * Rework memory management of clusters. Some of them were not malloc'ed but put on the stack, and then inserted in the list. Also 
avoid copying+deleting a cluster in CT_Get, return the original instead.
 * Use an union in the cluster struct to pack it a bit, since some data is used only in the color reduction phase, and some only in 
the palette lookup.

The result is maybe slower, but looks much, much better. Fixes issues 63 and 441.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1878 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-28 22:31:06 +00:00
2011-04-14 17:36:54 +00:00
2011-11-28 22:31:06 +00:00
2011-03-10 22:16:42 +00:00
Description
Fork of grafX2: The ultimate 256 color painting program https://gitlab.com/GrafX2/grafX2
16 MiB
Languages
C 89.3%
Lua 6.9%
Makefile 1.6%
NSIS 1.1%
Objective-C 0.4%
Other 0.5%