- From: <ryan.richards@ani-mayhem.com>
- Date: Fri, 2 Jan 2015 15:02:54 -0800
- To: www-svg@w3.org
In most SVG implementations certain seed values cause voids in the output of feTurbulence as the result of a bug in the reference code. The first seed that does this is 514. There are many more. I first encountered this issue while making an image for the 514th card of a game, as I was using feTurbulence seeded with the number of the card as the background texture.. With this initial seed number, lSeed = random(lSeed) will eventually yield a pair of numbers where (lseed % (BSize + BSize) - BSize) / BSize = 0 being added to fGradient ([k][i][0] and [k][i][1] in the code). Having a 0 is not a problem as long as the other number is not 0, there is an addition operation so the result is more than 0. However, when both numbers are 0 in the next step there is division by 0. That's a problem. The solution is to check if [k][i][0] and [k][i][0] are BOTH 0, and if they are, make them both not 0 by some method. I suggested making both 1 in my bug reports to Batik and Inkscape. Or ask Opera what method they used for the older version of their browser as it is not affected. Thank you.
Received on Saturday, 3 January 2015 12:52:26 UTC