HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Imagick::addNoiseImageWithAttenuate

← addNoiseImage   affineTransformImage →
NOISE_UNIFORM = 1;
NOISE_GAUSSIAN = 2;
NOISE_MULTIPLICATIVEGAUSSIAN = 3;
NOISE_IMPULSE = 4;
NOISE_LAPLACIAN = 5;
NOISE_POISSON = 6;
NOISE_RANDOM = 7;

Example

function addNoiseImageWithAttenuate($noiseType, $attenuate, $image_path, $channel)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->addNoiseImageWithAttenuate($noiseType, $attenuate, $channel);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}