libimagequant
libimagequant copied to clipboard
Could libimagequant be extended to more than 256 colours?
My use case is that I want to map images into the DMC Colour Chart, which has a palette of around 447 colours in it. Most programs are designed to map into a colour space of 256 colours or less; currently libimagequant appears to be one of those. My question is whether there's an easy path to being able to define a larger colour space without raising errors.
It can work, but you need to modify the source:
https://github.com/ImageOptim/libimagequant/blob/dc3e6d10ca11dd55744f3e51144ab1306d43d2a9/src/pal.rs#L200-L207