[cairo] [RFC] Color space API (partial proposal)

Chris Murphy lists at colorremedies.com
Tue Feb 23 08:32:56 PST 2010

On Feb 23, 2010, at 3:45 AM, Adrian Johnson wrote:

> Andrea Canciani wrote:
>> The attached changes to cairo.h are the base of what will probably be
>> my API change proposal for color space handling.
> This looks to be very close to what we need to be able to create PDF files with ICC based colors.
>> Basically all surfaces and patterns will have a color space in which
>> all the "math" related to them happens (compositing/blending for
>> surfaces, interpolation for patterns) and their colors are
>> interpreted. I think that after the creation the color space should
>> not be changed so I didn't write functions to permit it as this
>> operation seems to have no meaning in terms of colors.
> Changing the color space of surfaces after creation is not compatible with PDF and probably other vector backends.

I'm not sure this is true in every respect. There is a convert to profile option in later versions of Acrobat, and you can choose to convert the color space of objects. There are also plugins that will let you change the object profile (not a conversion, but a reassignment of the source profile).

Chris Murphy

More information about the cairo mailing list