W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2012

Re: [css-filters] linearRGB vs sRGB

From: Rik Cabanier <cabanier@gmail.com>
Date: Tue, 7 Feb 2012 15:38:44 -0800
Message-ID: <CAGN7qDCRodH-pUTFrHLQ+3t0KW676H7qJXPREC9xCsD_PJnBxQ@mail.gmail.com>
To: Chris Lilley <chris@w3.org>
Cc: public-fx@w3.org
I've been asking around if Adobe products deal with linearRGB and sRGB. It
turns out that we do, but are not always consistent.
For instance, by default Photoshop will resolve simple alpha blending just
like SVG (=sRGB), but Illustrator, InDesign and Acrobat use linearRGB.
Most filters and blending are done in sRGB.
Flash never applies curves so it's always using sRGB.

I think the default in HTML/SVG should become to always use sRGB. Applying
and reverting the curves are an expensive and advanced feature so it should
be optional.
Maybe there should also be only 1 keyword instead of 2....


On Mon, Feb 6, 2012 at 8:43 PM, Rik Cabanier <cabanier@gmail.com> wrote:

> 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 23:45:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 22 June 2015 03:33:46 UTC