noiseAddNoise() - Media Method

The noiseAddNoise() Method applies random pixels to an image to simulate a noise effect.

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

image.noiseAddNoise(

[Amount @ <value 1..999>]

[Gaussian @ <true, false>]

[Grayscale @ <true, false>]

);

Parameters

Amount - indicates the intensity of the effect. The default is 32.

Gaussian - toggles the Gaussian distribution effect on or off. The default is false (off).

Grayscale - applies the monochromatic scale to the affected pixels. The default is false (normal color).

Example

var image = new Media();

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

image.noiseAddNoise(Amount @ 15, Gaussian @ true, Grayscale @ true);

image.save(type @ "jpeg");