blur() - Media Method

The blur() method applies a simple blur filter on the image. For each pixel, all the pixels within the given radius are averaged and the result put in the destination image. This function fully supports CMYK.

Note:  This function is “selection aware”—if a selection is made, the system applies the function based on the current selection. For more information about making selections, see selection() - Media Method.

Syntax

blur(

Radius @ <value 0..30>

);

Parameters

Radius - specifies the radius (in pixels) of the effect.

Note:  The “radius” is actually square, so a radius of two results in averaging over a 5x5 square centered on the given pixel.

Example

var image = new Media();

image.load(name @ "peppers.tga");

image.blur(radius @ 12);

image.save(type @ "jpeg");