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

Kai-Uwe Behrmann ku.b at gmx.de
Sun Feb 28 13:29:01 PST 2010

Am 28.02.10, 11:14 -0800 schrieb Bill Spitzak:
> Kai-Uwe Behrmann wrote:
>> Am 24.02.10, 15:50 -0800 schrieb Bill Spitzak:
>>> Okay I think I missed something.
>>> Does a color space define how to mix the channels together? If so what 
>>> should we do about Cairo compositing operations that it does not include?
>> Currently ICC has no concept about mixing solour spaces at all.
> I think I am not asking the question correctly.
> If with new color-space-aware Cairo, I take an RGBA color in color space A 
> and "over" it into a buffer with RGBA blending space B, is this how it works:
> 1. Convert the color from color space A to color space B.
> 2. For each channel do out = color*A + out*(1-A). The mixing in destination 
> space is simple linear math that never changes.
> Alternative step 2 is:
> 2. Call the "over" function from color space B to do the math, which can 
> then do an arbitrary calculation.
> Which is it?
> I hope it is clear what I am asking. I think I may be running into the 
> problem that the answer is "obvious" to you and therefore you think I am 
> asking something else.

Again I do not think than ICC colour spaces have some configuration of 
blending. The user app has to select a blending space, convert each colour 
to that and then do the blending and store the result in the surface. So I 
would tent to 1) with the irritation that I miss the term blending space. 
But perhaps you mean destination space there as blending space.

kind regards
Kai-Uwe Behrmann
developing for colour management 
www.behrmann.name + www.oyranos.org

More information about the cairo mailing list