Re: [css-filters] linearRGB vs sRGB

On Mon, Feb 6, 2012 at 5:21 PM, Chris Lilley <chris@w3.org> wrote:

> On Tuesday, February 7, 2012, 12:05:42 AM, Rik wrote:
>
> RC> All,
> RC> currently the SVG spec states that by default, all filtering
> RC> operations should happen in linearRGB:
> RC> http://www.w3.org/TR/SVG/painting.html#ColorInterpolationProperties
>
> RC> If you want the filtering to happen in sRGB, you need to specify
> RC> 'color-interpolation-filters: sRGB'
>
> Correct.
>
> RC> My question is, can you do this with the shorthand CSS filters as well?
> RC>  I believe the opacity, brightness and contrast filters should
> RC> happen in sRGB and if the 'color-interpolation-filters' attribute
> RC> in not supported, there is no way to get that behavior.
>
> You may be right, but could you explain why those three should use
> companed sRGB rather than a light-linear space for computation?
>

I'm actually not sure.
It seems that everything in SVG should just be done in the sRGB colorspace.
The actual color management should be done in the output device (ie your
graphics card or a printer).
Applying and unapplying the gamma curve is very resource intensive and I
believe it might lead to color degradation since the operations are done on
bytes and not floats.

Could you explain again why there is a need for linearRGB?


> (And you are correct that the 'color-interpolation-filters' property
> should either be directly supported in the shorthand syntax, or
> alternatively each shorthand should state what the effective value of
> 'color-interpolation-filters' is - as well as giving the equivalent
> element-based filter syntax that corresponds to the shorthand.
>
>
>

Received on Tuesday, 7 February 2012 04:49:34 UTC