-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Our AeCairoA8FastGaussianBlurFilter adapts a blur algorithm that takes "sigma" as parameter to indicate the level of blur to apply (greater sigma means more blur). Now, our implementation takes a "blur radius" as parameter, which immediately converts to sigma multiplying radius by a factor.
It should be possible to pass sigma directly as parameter. For example, in SVG's blur (feGaussianBlur), you specify sigma directly.
Additionally, the factor we use to convert from radius to sigma is not well justified:
Alexandrie/src/Alexandrie-Cairo/AeCairoA8FastGaussianBlurFilter.class.st
Lines 205 to 206 in 4c8e537
| "See: https://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement" | |
| GaussianScaleFactor := (3 * (Float twoPi sqrt) / 4) * 1.5 |
Sadly, besides I wrote this code, I don't remember the origin of the formula for this conversion factor. The spec referenced by the URL doesn't clarify enough, or in any case the code uses 1.5 while spec has 0.5.