(img, radius)
| 3155 | } |
| 3156 | |
| 3157 | function blur(img, radius) { |
| 3158 | /* Applies a stack blur filter to the image and returns the blurred image. |
| 3159 | * - radius: the radius of the blur effect in pixels (0-175). |
| 3160 | */ |
| 3161 | radius = (radius === undefined)? 10 : radius; |
| 3162 | radius = Math.min(radius, 175); |
| 3163 | var buffer = new OffscreenBuffer(img._img.width, img._img.height); |
| 3164 | return _stackblur(img, buffer, radius); |
| 3165 | } |
| 3166 | |
| 3167 | /*--- IMAGE FILTERS | ALPHA COMPOSITING ------------------------------------------------------------*/ |
| 3168 | // Based on: R. Dura, 2009, http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/ |
no test coverage detected
searching dependent graphs…