Thanks to DawnBringer for icon drawing.
All skins use the same icon, feel free to draw something else for them.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1893 416bcca6-2ee7-4201-b75f-2eb2f807beb1
* Switch to Mac OS X Lion (doesn't xhange much, if someone still wants to do a build on Tiger for PPC support it's easy)
* Cleanup things that got messed up by the $(shell) changes
* Add some comments that can be uncommented when building with MacPorts, instead of the more official OSX frameworks. This seems easier to setup, but does not provide portable binaries (the SDL framework can't be embedded in the app).
Many thanks to Rikard Lang for giving access to an OSX computer so I could debug stuff!
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1892 416bcca6-2ee7-4201-b75f-2eb2f807beb1
* Compute the height of the preview matching the image aspect ratio, to avoid relying on the menu being shown. Also put the preview above the menu, to not hide other buttons.
* Exit the popup loop when a button is clicked. This works for show/hide, but not for selecting a layer ? I don't get why... Any idea ?
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1887 416bcca6-2ee7-4201-b75f-2eb2f807beb1
* Add some const in function parameters, just to make sure.
* Cleanup the comments, because I got lost in my own code...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1881 416bcca6-2ee7-4201-b75f-2eb2f807beb1
* 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
* Further optimization to the colortree, now allocated in one single chunk of 4090 bytes (2051 times better than original code!).
Not doing all the malloc/frees should be slightly faster, and it also helps with cache locality (the whole tree can fit in the
cache).
* Remove the useless color "balancing" multipliers that did more harm than good.
We still need some improvements on the median cut, or maybe switch to a smarter algorithm; or add some cheats. See the JFIF quirks
for an example.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1876 416bcca6-2ee7-4201-b75f-2eb2f807beb1
There is room for optimization and maybe bugfixing.
The cluster table size is now:
511*15 = 7665bytes, this is 1094 times better than the color table.
Please test and report your results !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1874 416bcca6-2ee7-4201-b75f-2eb2f807beb1
The 8megabytes conversion table is replaced by an octree taking 10kbytes (800 times better !)
The conversion is done with full 24bit precision instead of 19 bits (8 green, 6 red, 5 blue) previously.
Not added to makefile and integrated yet, because I need to bugfix first.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1873 416bcca6-2ee7-4201-b75f-2eb2f807beb1
* Remove useless and undocumented function getbrushtransparentcolor (does the same as getbackcolor)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1832 416bcca6-2ee7-4201-b75f-2eb2f807beb1