W3C home > Mailing lists > Public > public-svg-wg@w3.org > October to December 2010

Re: min/max values for filters

From: Tavmjong Bah <tavmjong@free.fr>
Date: Sun, 14 Nov 2010 11:23:32 +0100
To: Patrick Dengler <patd@microsoft.com>
Cc: SVG Working Group WG <public-svg-wg@w3.org>
Message-ID: <1289730212.16011.227.camel@LeChien>
On Fri, 2010-11-12 at 00:14 +0000, Patrick Dengler wrote:
> We have been looking at the filters chapter and believe that there
> would be a benefit for setting min/max for some of the attributes.  We
> are recommending these as currently, without these bounds, most
> browsers would likely peg the CPU so badly, it would lead it to be
> inoperable, or are reasonable limits a developer would want or a  user
> could perceive.  We'd like to see these expressed in a future version
> of the filters specification, but would like to see it documented.

One should be a bit careful in setting limits as sometimes what are
useful values aren't initially apparent. I've fought this battle a few
times with Inkscape where someone changes the limit in the Inkscape
interface and breaks one of my examples. Having said that, I don't see
any real problems with the proposed limits.

> feConvolveMatrix:  Order (Kernel Units)	
> Min : (1, 1) 
> Max: (10, 10)	

Seems reasonable other than odd orders are probably more useful than
even orders so an odd maximum might be more appropriate (9 or 11?).
Inkscape built-in filters only use an order of 3. I've used 5 in some
examples.

> feConvolveMatrix, feSpecularlighting , feDiffuseLighting: Kernel Unit Length 	
> Min: 0.1
> Max: 10

Inkscape built-in filters don't use KernelUnitLength at the moment. The
spec mentions that pixel alignment can result in faster performance so
perhaps a maximum that is a power of 2 is appropriate (16?).

> feMorphology: Radius
> Max: 150

Range in Inkscape built-in filters is 0.65 to 10.

> feTurblulance: numOctaves
> Max: 10

Range in Inkscape built-in filters is 1 to 10. The use of 10 maybe the
result of that being the maximum value allowed in the Inkscape Filter
Dialog. I decreased the value to 5 in all the filters where it was used
and saw only minor differences. Ten should be a safe maximum.


					Tav
Received on Sunday, 14 November 2010 10:24:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 14 November 2010 10:24:10 GMT