Re: CSS WG comments on SVG 1.2

Hi Bert,

Bert Bos wrote:

> c) The 'rendering-color-space' property appears to be redundant with 
> CSS3 Color's 'color-profile' property.

   I think the two are in fact quite different.  The 'color-profile'
property (which has been in SVG since 1.0) at least in SVG, is used
to provide a color space for a raster image (it isn't as clear
what it's intent is in CSS 3 although the description appears to
talk about images quite a bit).  This means that the code values
are interpreted "as is" in the provided color space.

    The rendering-color-space property indicates what color space
the compositing should take place in.  The content is color
converted to the compositing color space before compositing
occurs and assuming a higher level element has a different
rendering color space the result is color converted after all the
compositing is completed.

    Put another way color-profile is used to achieve either color
effects or to 'fix' broken image content.  rendering-color-space is
used to control compositing to ensure that clipping or other effects
(linear vs gamma corrected) don't degrade image quality.

    To take a concrete example if you used a simple BGR ICC
profile and applied it to an image with color-profile your
red and blue channels would appear swapped in the final image.
If you used the same profile to set the rendering-color-space
for the document (or the group containing the image) there
should be no visible difference.

    I will note that this analysis is complicated by the fact that
the definition of color-profile in CSS 3 is not very clear, in 
particular it's not clear if this only applies to referenced raster
content or any element/subtree[1]. So most of this is based on the
definition of color-profile property in SVG - which may not be
100% accurate, although hopefully it is (otherwise CSS 3 has a
conflict with SVG 1.0).

[1] Even if it applies to any element as long as it retains it's "set
the color space" behavior I think it is quite different. Although
I would really have to wonder about it's value in this case.

Received on Monday, 29 November 2004 01:56:43 UTC