W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2011

generators in filters (or maybe even "anywhere there are images")

From: Dean Jackson <dino@apple.com>
Date: Wed, 20 Apr 2011 11:14:34 +1000
Message-id: <CC98655D-DC0D-48B3-A177-847C5C839511@apple.com>
To: public-fx@w3.org
This is something that came up while I was editing the filters specification.

There are some existing filters (eg feFlood, feTurbulence, feImage) and well-known effects (lenticular halos are a commonly overused example, also [1]) which generate images from scratch rather than manipulate inputs. These don't really fit into the model of the 'filter' property, which is a linear chain of effects, since any input would be completely wiped out by the new image. They work in the model of the 'filter' element, since that can be declared as a graph that composites multiple inputs.

How important do we consider these effects as part of the property?

One solution would be to declare some effects as compositing before or after their input. For example, a flood effect would first draw the solid colour then composite the input image, whereas a lenticular halo would composite the input image, then draw the halo. [NOTE: I'm not suggesting lenticular halo is a must-have effect!]. Or maybe this could be a parameter to the effect? I can imagine some cases where you'd want to flood over the input image, then animate the flood colour from transparent to opaque.

Then I was thinking that these generator effects are similar to other parts of CSS, in particular gradients. There have been some proposals in this area. For example:

- WebKit's -webkit-canvas value, which allows an element to use a canvas element as an image in background, border, whatever.
- Mozilla's -moz-element, which does the same but with the rendering of any element

Examples of generators may be:

- checkerboards
- stripes
- noise
- star shines

They don't sound too useful in isolation, but graphics artists may feel otherwise. Anyway, the important part of this message is the 3rd paragraph. I don't want to complicate the syntax or implementations. "SVG" filters provide the functionality, so it definitely isn't essential.

Dean


[1] http://www.theonion.com/articles/graphic-designers-judgment-clouded-by-desire-to-us,249/
Received on Wednesday, 20 April 2011 01:15:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 20 April 2011 01:15:06 GMT