libimagequant icon indicating copy to clipboard operation
libimagequant copied to clipboard

Could libimagequant be extended to more than 256 colours?

Open cmeister2 opened this issue 1 year ago • 1 comments

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.

cmeister2 avatar Apr 10 '23 20:04 cmeister2

It can work, but you need to modify the source:

https://github.com/ImageOptim/libimagequant/blob/dc3e6d10ca11dd55744f3e51144ab1306d43d2a9/src/pal.rs#L200-L207

kornelski avatar Apr 10 '23 21:04 kornelski