W3C home > Mailing lists > Public > www-svg@w3.org > October 2011

Re: feColorMatrix type="saturate"

From: Erik Dahlstrom <ed@opera.com>
Date: Mon, 03 Oct 2011 09:13:13 +0200
To: "Dirk Schulze" <vbs85@gmx.de>
Cc: "Chris Lilley" <chris@w3.org>, www-svg@w3.org
Message-ID: <op.v2rk0bingeuyw5@localhost.localdomain>
On Sun, 02 Oct 2011 08:37:38 +0200, Dirk Schulze <vbs85@gmx.de> wrote:

>>
>> I've just made that change in the Filter Effects draft:
>>
>>    http://dvcs.w3.org/hg/FXTF/raw-file/3f1fdd4a8004/filters/publish/Filters.html#feColorMatrixElement
>
> Just for clarification: If the values are outside the range of 0..1, we  
> can get color values outside the range of 0..255. I assume the color  
> value should be set to 0 if new value < 0 and set to 255 if new color  
> value > 255.
>
> An example for the red channel, a saturation of 4 and the color rgb(255,  
> 0, 255):
>
> (0.2127 + 0.7873 * 4) * 255 + (0.7152 - 0.7152 * 4) * 0 + (0.0722 -  
> 0.0722 * 4) * 255 = 802.0515

Yes, all channel components are clamped to the supported range when  
stored, same as with any other filter primitive. That's already stated in  
the overview, section 8.1 [1].

[1]  
http://dvcs.w3.org/hg/FXTF/raw-file/3f1fdd4a8004/filters/publish/Filters.html#FilterPrimitivesOverviewIntro

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Monday, 3 October 2011 07:13:46 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:49 GMT