haroldo-ok / RgbQuant-SMS.js

RgbQuant.js adapted for quantizing images for the Sega Master System hardware
https://haroldo-ok.github.io/RgbQuant-SMS.js/RgbQuant-SMS.js/demo/index.html
15 stars 1 forks source link

Allow the user to define part of the palette #5

Open haroldo-ok opened 9 years ago

haroldo-ok commented 9 years ago

Objective

Allow the user to optionally define a few that would have to be obligatorily present on the end palette, and then let the program choose the rest, just in case he/she has a few reserved colors.

How?

The histogram of the quantizer would be prepopulated with those colors, putting an artificially high value on the color count of the corresponding slots on the histogram. After the colors are reduced, the final palette may need to be reordered to fit what the user passed.