SVG masks and luminance calculations

Hello masked avengers ;)

I'm wondering why SVG 1.1 overrides the color-interpolation property for  
mask elements, as reported here[2]. More specifically, the bit of the spec  
this concerns is [1]:

     A linear luminance value is computed from the color channel values.  
     can be done, for example, by first converting the original image color
     values (potentially in the sRGB color space) to the linear RGB color  
     (see Rendering properties). Then, using non-premultiplied linear RGB  
     values, apply the luminance-to-alpha coefficients (as defined in the
     ‘feColorMatrix’ filter primitive)...

I don't fully understand why masks need this kind of special treatment, if  
one wants a linearRGB colorspace why not just use  
color-interpolation="linearRGB" explicitly? The color-interpolation  
property has an initial value of 'sRGB', and it applies to container  
elements (including <mask>). To me this looks like a contradiction in the  
spec. For performance reasons I would like to propose that the default  
behaviour is changed so that it respects the 'color-interpolation'  
property, while maintaining the existing behaviour via  

If anyone has the history of this that would be interesting to hear. I  
have already been through the thread here[3], but there were no mentions  
of the above.



Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog:

Received on Wednesday, 2 February 2011 14:38:06 UTC