[cairo] Reducing number of colors

Chris Wilson chris at chris-wilson.co.uk
Tue Jul 2 04:27:00 PDT 2013

On Tue, Jun 25, 2013 at 08:16:22AM +0200, Bernhard R. Fischer wrote:
> Hi!
> Image surfaces are supported as true color (24/32 bit) or 5/6/5 bit pixels.
> Is there any native way in cairo to reduce colors to fixed number palette 
> image?

No, there is nothing inside cairo to perform the quantization you wish -
it is outside of Cairo's scope.  I would suggest you hook the output of
your rendering into ImageMagick and use some of its routines to control
the quantization of the image to a fixed palette.

Chris Wilson, Intel Open Source Technology Centre

More information about the cairo mailing list