[webkit-dev] Color Management
hyatt at apple.com
Wed Sep 1 13:39:39 PDT 2010
On Sep 1, 2010, at 9:52 AM, Igor Trindade Oliveira wrote:
> 2010/9/1 Alexey Proskuryakov <ap at webkit.org>:
>> 01.09.2010, в 08:31, Igor Trindade Oliveira написал(а):
>>> a) use an external dependency(littlecms for example);
>>> b) write from scratch all the ICC Profile specification;
>>> What do you guys think what the best approach?
>> I think that the first question to answer is why a CMS implementation is needed in WebKit at all. It's normally the job of a drawing library to perform the conversion behind the scenes.
>> For example, one can specify a color space when drawing with CoreGraphics (as used by Mac and Windows Safari). If some platforms don't have such support, deciding what to do with colors should be left to platform-specific code in WebKit anyway.
>> This is what already happens with images that have color profiles embedded, for example.
>> - WBR, Alexey Proskuryakov
> in Qt and Cairo Graphics side does not exist internally any color
> management system normally the application that needs it uses a
> external dependency like littlecms, this approach is used by Krita
> for example. So if the graphics api does not have any support to color
> management the fallback could be done to WebKit CMS.
> Other use case could be used by icc support in css3. In the last
> draft, css3 drops color-profile property due to a lack of
> implementation .
It seems like this support would just be behind the GraphicsContext abstraction (which is already colorspace-aware). I don't see why you'd need code above GraphicsContext. Even color-profile in CSS should ultimately just pass the contents of the color profile to GraphicsContext.
For example CoreGraphics supports CGColorSpaceCreateWithICCProfile, so I'd just expect GraphicsContext to take the ICC profile data and let the platform decide what to do with it.
(hyatt at apple.com)
More information about the webkit-dev