W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2011

[filters] opacity() filter function?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 5 Sep 2011 15:49:48 -0700
Message-ID: <CAAWBYDB8Ui2nGJZrqXRX43J7q8Q0jgcYNpyi3oYfVuEbLSgFYw@mail.gmail.com>
To: public-fx@w3.org
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">
    <feFuncA type="table" tableValues="0 [amount]" />

Received on Monday, 5 September 2011 22:50:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:38 UTC