# HG changeset patch
# User Dean Jackson
| R' | | 0 0 0 0 0 | | R |
| G' | | 0 0 0 0 0 | | G |
| B' | = | 0 0 0 0 0 | * | B |
- | A' | | 0.2125 0.7154 0.0721 0 0 | | A |
+ | A' | | 0.2127 0.7152 0.0722 0 0 | | A |
| 1 | | 0 0 0 0 1 | | 1 |
<filter id="grayscale"> <feColorMatrix type="matrix" - values="(0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 - (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 - (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 + values="(0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 + (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 + (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 0 0 0 1 0"/> </filter>@@ -3654,6 +3668,14 @@ </feComponentTransfer> </filter> +
<filter id="opacity"> + <feComponentTransfer> + <feFuncA type="table" tableValues="0 [amount]"/> + </feComponentTransfer> + </filter>+
<filter id="gamma"> diff -r 31e848f19ceb -r b31bb9367aef filters/publish/ChangeLog --- a/filters/publish/ChangeLog Wed Aug 31 10:55:35 2011 +1000 +++ b/filters/publish/ChangeLog Wed Sep 07 10:26:03 2011 +1000 @@ -1,6 +1,11 @@ Changes for Filter Effects specification ---------------------------------------- +2011-09-07 Dean Jackson-+ +- Added opacity function +- Corrected luminanceToAlpha values + 2011-08-31 Dean Jackson - Remove commas from shorthand function parameter input. diff -r 31e848f19ceb -r b31bb9367aef filters/publish/Filters.html --- a/filters/publish/Filters.html Wed Aug 31 10:55:35 2011 +1000 +++ b/filters/publish/Filters.html Wed Sep 07 10:26:03 2011 +1000 @@ -14,7 +14,7 @@ @@ -142,10 +142,11 @@Filter Effects 1.0: Language
-W3C Editor’s Draft 31 August 2011
+W3C Editor’s Draft 07 September 2011
- This version:
- https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html
- Latest version:
- http://www.w3.org/TR/FilterEffects10/
- Previous version:
- http://www.w3.org/TR/2007/WD-SVGFilter12-20070501/
- Editors:
- Erik Dahlström, (Opera Software ASA)
- Dean Jackson (Apple Inc)
- Authors:
- The authors of this specification are the participants of the W3C SVG and CSS Working Groups.
Copyright © 2011 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
32.3 saturate 32.4 hue-rotate 32.5 invert -32.6 gamma -32.7 blur -32.8 sharpen -32.9 drop-shadow +32.6 opacity +32.7 gamma +32.8 blur +32.9 sharpen +32.10 drop-shadow 33 DOM interfaces
- 33.1 Interface ImageData
- 33.2 Interface SVGFilterElement
@@ -394,6 +395,15 @@ If the 'amount' parameter is missing, a value of 1 is used. The markup equivalent of this function is given below.- + opacity(amount) +
- + Applies transparency to the samples in the input image. The value of 'amount' defines the proportion + of the conversion. A value of 1 is completely transparent. A value of 0 leaves the + input unchanged. Values between 0 and 1 are linear multipliers on the effect. + This is equivalent to multiplying the input image samples by (1 - amount). + If the 'amount' parameter is missing, a value of 1 is used. + The markup equivalent of this function is given below. +
- gamma(amplitude exponent offset)
- Applies a gamma function to the input image. @@ -1369,11 +1379,11 @@ equivalent to the following matrix operation:
For type="hueRotate", values is a single one real number value @@ -1392,21 +1402,23 @@ where the terms a00, a01, etc. are calculated as follows: Thus, the upper left term of the hue matrix turns out to be:
@@ -1418,7 +1430,7 @@
| R' | | 0 0 0 0 0 | | R | | G' | | 0 0 0 0 0 | | G | | B' | = | 0 0 0 0 0 | * | B | - | A' | | 0.2125 0.7154 0.0721 0 0 | | A | + | A' | | 0.2127 0.7152 0.0722 0 0 | | A | | 1 | | 0 0 0 0 1 | | 1 |@@ -3545,9 +3557,9 @@<filter id="grayscale"> <feColorMatrix type="matrix" - values="(0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 - (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 - (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 + values="(0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 + (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 + (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 0 0 0 1 0"/> </filter>@@ -3585,7 +3597,15 @@ </feComponentTransfer> </filter>
<filter id="opacity"> + <feComponentTransfer> + <feFuncA type="table" tableValues="0 [amount]"/> + </feComponentTransfer> + </filter>+ +
<filter id="gamma"> <feComponentTransfer> @@ -3595,19 +3615,19 @@ </feComponentTransfer> </filter>-
<filter id="blur"> <feGaussianBlur stdDeviation="[radiusX radiusY]"> </filter>-
<filter id="unsharp"> <feUnsharpMask stdDeviation="[radius]" threshold="[threshold]" amount="[amount]"> </filter>-
<filter id="drop-shadow"> <feGaussianBlur in="[alpha-channel-of-input]" stdDeviation="[radius]"/>