Hi, Looking Webkit color class(WebCore/platform/graphics/Color.*) all the colours format are always converted to rgb/rgba format. But Qt for example can handle many kind of colors like hsl, cmyk and rgba (all supported by webkit). is There any kind of reason to always convert colors to rgba? Theses converts could not be used just like a fallback when the graphics api does not have support for these formats? Igor
Is there any real world problem changing this would solve? If not, the current approach works and is efficient since a color takes just a 32-bit integer plus one more bit to store. -- Darin
Hello, yeah. Webkit supporting ICC profiles could be a good real case. Igor 2010/8/30 Darin Adler <darin@apple.com>:
Is there any real world problem changing this would solve? If not, the current approach works and is efficient since a color takes just a 32-bit integer plus one more bit to store.
-- Darin
On Aug 30, 2010, at 5:51 PM, Igor Trindade Oliveira wrote:
WebKit supporting ICC profiles could be a good real case.
I think we will want that feature eventually. Changing the Color class would probably not be needed, though, for that. If you start working on that kind of feature, I can help you figure out what it takes, and if it turns out I’m wrong we are definitely open to changing the class design. We won’t just change the class based on “Why not?” -- Darin
Hello, 2010/8/30 Darin Adler <darin@apple.com>:
On Aug 30, 2010, at 5:51 PM, Igor Trindade Oliveira wrote:
WebKit supporting ICC profiles could be a good real case.
I think we will want that feature eventually. Changing the Color class would probably not be needed, though, for that. If you start working on that kind of feature, I can help you figure out what it takes, and if it turns out I’m wrong we are definitely open to changing the class design. We won’t just change the class based on “Why not?”
-- Darin
There are some pieces from webkit i looked to do this work. Already there is an initial ColorSpace enum in Webkit(WebCore/platform/graphics/ColorSpace.h) and a color transformation(SRGBA<->RGBA) in WebCore/platform/graphics/ImageBuffer.cpp. I was looking first in color because it is used by css parserColorFromValue and some kind of colors(gammut) are not correctly converted to CMYK(they are out of gammut). Igor
30.08.2010, в 17:45, Darin Adler написал(а):
Is there any real world problem changing this would solve? If not, the current approach works and is efficient since a color takes just a 32-bit integer plus one more bit to store.
Full support for CMYK and other formats could make printing better, see <https://bugs.webkit.org/show_bug.cgi?id=12205>. But we'd need to pass these to printing layer unchanged, as opposed to letting color matching convert them to RGB. - WBR, Alexey Proskuryakov
hi, Alexey, yeah it is the main idea for now. Darin, I am going to work in icc profile/color management support, so looking color class I saw this possible "fix" and asked webkit-dev opinion. But any advice about color management in webkit would be fine. Igor 2010/8/31 Alexey Proskuryakov <ap@webkit.org>:
30.08.2010, в 17:45, Darin Adler написал(а):
Is there any real world problem changing this would solve? If not, the current approach works and is efficient since a color takes just a 32-bit integer plus one more bit to store.
Full support for CMYK and other formats could make printing better, see <https://bugs.webkit.org/show_bug.cgi?id=12205>. But we'd need to pass these to printing layer unchanged, as opposed to letting color matching convert them to RGB.
- WBR, Alexey Proskuryakov
participants (3)
-
Alexey Proskuryakov
-
Darin Adler
-
Igor Trindade Oliveira