<?php
bool public Imagick::blurImage(
float $radius,
float $sigma,
int $channel = ?
);
?>
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 several times
$path = PATH2IMGW . '/xtr/1529849447.jpg';
$str1img = 'img/xtr/blu/1529849447bi.jpg';
$radius = mt_rand(0, 10);
$sigma = mt_rand(0, 100);
$imagick = new Imagick($path);
$imagick->blurImage($radius, $sigma);
$image1 = $imagick->getImageBlob();
$img = imagecreatefromstring($image1);
imagegif($img, $str1img);
echo basename($str1img); ?>
<br><br>
<img src="<?php echo $str1img; ?>"
alt="<?php echo $str1img; ?>"
title="<?php echo $str1img; ?>">
<?php
// Run several times
$path = PATH2IMGW . '/xtr/1529861633.jpg';
$str2img = 'img/xtr/blu/1529861633bi.jpg';
$radius = mt_rand(0, 10);
$sigma = mt_rand(0, 100);
$imagick = new Imagick($path);
$imagick->blurImage($radius, $sigma, $channel);
$image2 = $imagick->getImageBlob();
$img = imagecreatefromstring($image2);
imagegif($img, $str2img);
echo "Radius = $radius<br>Sigma = $sigma<br><br>";
echo basename($str2img); ?>
<br><br>
<img src="<?php echo $str2img; ?>"
alt="<?php echo $str2img; ?>"
title="<?php echo $str2img; ?>">