[webkit-dev] Color Management

Igor Trindade Oliveira itrindade.oliveira at gmail.com
Thu Sep 2 06:39:00 PDT 2010


2010/9/1 David Hyatt <hyatt at apple.com>:
> 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
>>>
>>>
>>
>> Hi,
>>
>> 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[1]
>> 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 [2][3].
>
>
> 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.
>
> dave
> (hyatt at apple.com)
>
>
>

My concern about this approach is have duplicated code in plataform
code because many of them do not provide any kind of ICC profile
support(qt and cairo for example).
But is good to see we are reaching a consensus.

Igor


More information about the webkit-dev mailing list