Conversation
|
It looks like I've hit a blocker: putting a palette into VipsQuantiseResult using vips__quantise_image_quantize_fixed() seems to renumber the palette. I think we need a supported way to set the palette that we want vips__quantise_write_remapped_image() to use. |
|
To show the problem, try this:
To make: You can see the index has become scrambled. Index 0 of the palette is: But that RGBA appears in the palette built by vips__quantise_image_quantize_fixed() as: Index 53. |
|
@jcupitt is this totally discarded? This feature would be awesome to extract most used/dominant colors. |
|
It's not discarded, just snoozing :) Maybe I'll find time to work on it again later this year. Or someone else could pick it up, of course. |
|
@jcupitt could it be possible to add a parameter to specify the number of colors for the palette? |
|
@infacto yes, though it's blocked on the remapper not supporting a generated palette, unfortunately. This needs a small change to an upstream project. |






See #3010 and #2841
So far this is just a simple wrapper around the quantiser.
To do
pngloadattach the load palette? tiff could toogif-paletteand get that to set plainpaletteas well