Re: SVG masks and luminance calculations

>> 
>> Given the fact that there are still bug reports about a wrong behavior on Firefox, it looks like the spec is a bit confusing here. I agree to Eric that linearRGB as default looks a bit confusing since the default of color-interpolation is sRGB. I guess the root of this phrasing is the specification of SVG Filters. The masking text relies to 'feColorMatrix'. And the default color space on filters is linearRGB[1].
>> Both confused me at the time I startet working on implementing masks[2] and filters. But filter has another property named 'color-interpolation-filters'. And the default value is linearRGB for this property. So even if I'm unsure why linearRGB was chosen, the definition looks clear here. This is different on Masking. And it might make sense to use sRGB as default.
>> The most(unsure about Safari/Win) ports of WebKit use linearRGB as default now, but it's no problem to change it back to sRGB. Note that the masking tests on the test suite would need new results, or the tests need to use  color-interpolation="linearRGB" explicitly.
> 
> I don't think that there are any tests in the testsuite where such a change would give a very different result visually.
> 
> It would make sense to include a test to clearly show the difference though. With gradients and with raster images with alpha.
> /Erik

We noticed a difference on masking-intro-01-f[1] and masking-mask-01-b[2] on running our pixel tests. But again, no new results are needed, if the <mask> elements include 'color-interpolation="linearRGB"'. This shouldn't be a problem, if a new test covers the differences between color spaces.

Cheers,
Dirk

[1] http://dev.w3.org/SVG/profiles/1.1F2/test/svg/masking-intro-01-f.svg
[2] http://dev.w3.org/SVG/profiles/1.1F2/test/svg/masking-mask-01-b.svg

Received on Thursday, 3 February 2011 10:15:03 UTC