<?php
bool public Imagick::addNoiseImage(
int $noise_type,
int $channel = Imagick::CHANNEL_DEFAULT
);
?>
AVAILABLE "imagick" NOISE STUDIED IN THIS TUTORIAL 1690 - ImageMagick 6.9.10-6 | ||
NOISE | ||
CONSTANT | VALUE | ABOUT |
imagick::NOISE_UNIFORM | 1 | |
imagick::NOISE_GAUSSIAN | 2 | |
imagick::NOISE_MULTIPLICATIVEGAUSSIAN | 3 | |
imagick::NOISE_IMPULSE | 4 | |
imagick::NOISE_LAPLACIAN | 5 | |
imagick::NOISE_POISSON | 6 | |
imagick::NOISE_RANDOM | 7 | ImageMagick version 6.3.6 or higher. |
ed48 |
AVAILABLE "imagick" CHANNEL STUDIED IN THIS TUTORIAL 1690 - ImageMagick 6.9.10-6 | ||
CHANNEL | ||
CONSTANT | VALUE | ABOUT |
imagick::CHANNEL_UNDEFINED | 0 | |
imagick::CHANNEL_RED | 1 | |
imagick::CHANNEL_GRAY | 1 | |
imagick::CHANNEL_CYAN | 1 | |
imagick::CHANNEL_GREEN | 2 | |
imagick::CHANNEL_MAGENTA | 2 | |
imagick::CHANNEL_BLUE | 4 | |
imagick::CHANNEL_YELLOW | 4 | |
imagick::CHANNEL_ALPHA | 8 | |
imagick::CHANNEL_OPACITY | 8 | |
imagick::CHANNEL_MATTE | 8 | |
imagick::CHANNEL_BLACK | 32 | |
imagick::CHANNEL_INDEX | 32 | |
imagick::CHANNEL_ALL | 134217727 | |
imagick::CHANNEL_DEFAULT | 134217719 | |
ed48 |
<?php
// Run this several times
$imagick = new Imagick(PATH2IMGW . '/bmp/aa.bmp');
$str1img = 'img/results/aa551.bmp';
$noise_type = imagick::NOISE_RANDOM;
$channel = imagick::CHANNEL_DEFAULT;
$imagick->addNoiseImage($noise_type, $channel);
$Data = $imagick->getImageBlob();
$img = imagecreatefromstring($Data);
imagebmp($img, $str1img, false);
echo basename($str1img); ?>
<br><br>
<img src="<?php echo $str1img; ?>"
alt="<?php echo $str1img; ?>"
title="<?php echo $str1img; ?>">