Re: [filters] opacity() filter function?

Thanks Tab,

I agree. I'll add this to the spec. If anyone objects, please do so here.

This reminds me of something else that I'll propose in a separate email so that we track the discussion a little easier.

Dean

On 06/09/2011, at 8:49 AM, Tab Atkins Jr. wrote:

> I think it would be useful to add an opacity() filter function to the
> Filters spec.  This isn't necessary for the 'filter' property (just
> use the 'opacity' property instead), but would be nice when filtering
> images via the filter() function (which appears to have not yet made
> it into the draft).  Currently, the only way to make an image
> partially-transparent is to use the cross-fade() function, which is
> somewhat verbose and non-obvious:
> 
> cross-fade(image(transparent), url(foo.jpg), 20%)
> 
> I think the markup equivalent would be:
> 
> <filter id="opacity">
>  <feComponentTransfer>
>    <feFuncA type="table" tableValues="0 [amount]" />
>  </feComponentTransfer>
> </filter>
> 
> ~TJ
> 

Received on Tuesday, 6 September 2011 05:32:55 UTC