Page 1 of 1

Image quantizer for Uzebox (and other retro stuff)

Posted: Fri Mar 31, 2017 6:32 pm
by Jubatian
I have an image quantizer which is suitable for use with Uzebox here:

https://github.com/Jubatian/InsaniQuant

Why? I updated this while working on my SPI RAM graphics modes where it may be more useful to have larger images (however it might find some use with non-SPI RAM stuff, tiny images too). If you wanted to specifically quantize an image for use with Uzebox or some other retro stuff, you would find there isn't any real solution due to the low bpp palette (you could quantize to an Uzebox palette of course, but you wouldn't be able to quantize a 16 color image with such a palette constraint).

You can target the Uzebox by requesting a color depth of "332" (3 bit Red, 3 bit Green, 2 bit Blue) with this, and it tends to work well especially with low color counts (such as even 2bpp).

Re: Image quantizer for Uzebox (and other retro stuff)

Posted: Sat Apr 01, 2017 5:23 am
by D3thAdd3r
Looks to be a useful tool, especially I can think of some interesting things for SPI ram and lower than 8bpp this would be ideal for.

Re: Image quantizer for Uzebox (and other retro stuff)

Posted: Thu Apr 06, 2017 2:54 am
by Artcfox
I look forward to trying this versus the built-in color reduction that GIMP does.

Re: Image quantizer for Uzebox (and other retro stuff)

Posted: Thu Apr 06, 2017 7:57 am
by Jubatian
You can do some quick comparisons by downloading the first archive from the SPI RAM Mode 74 topic, it contains the source image in its original format (192 x 216 @ 24bpp). So you don't necessary have to compile InsaniQuant to see this (quantize the image with Gimp to 16 or 8 colors respecively and compare the result to those screenshots in the topic, the selection of colors of course would be different, though since Gimp wouldn't quantize to the Uzebox palette).

I created InsaniQuant originally exactly because I was very unsatisfied by Gimp's results, both for color selection and dithering. Subjectively for me the results of this experiment look fairly decent, although falling a little behind to what PNGQuant can do (and it is a lot slower, although it also supports alpha quantizing, one of the goals was especially that). PNGQuant however can not quantize for Uzebox's palette.