Imagick::blurImage


wizard apg

ADDS blur filter to image.



<?php

bool 
public Imagick::blurImage(
                            
float $radius
                            
float $sigma
                              
int $channel = ?
                               );
                               
?>

$radius


The blur radius.



$sigma


The standard deviation.



$channel


One of channel constant.

When not supplied, all channels are blurred.





This function returns true on success.



AVAILABLE "imagick" CHANNEL
STUDIED IN THIS TUTORIAL

1690 - ImageMagick 6.9.10-6
CHANNEL
CONSTANTVALUEABOUT
imagick::CHANNEL_UNDEFINED0 
imagick::CHANNEL_RED1 
imagick::CHANNEL_GRAY1 
imagick::CHANNEL_CYAN1 
imagick::CHANNEL_GREEN2 
imagick::CHANNEL_MAGENTA2 
imagick::CHANNEL_BLUE4 
imagick::CHANNEL_YELLOW4 
imagick::CHANNEL_ALPHA8 
imagick::CHANNEL_OPACITY8 
imagick::CHANNEL_MATTE 8  
imagick::CHANNEL_BLACK32 
imagick::CHANNEL_INDEX32 
imagick::CHANNEL_ALL134217727 
imagick::CHANNEL_DEFAULT134217719 
ed48

  1 EXERCISE   

<?php

// Run several times 
 
$path PATH2IMGW '/xtr/1529849447.jpg';
    
$str1img 'img/xtr/blu/1529849447bi.jpg';
    
$radius mt_rand(010);
    
$sigma mt_rand(0100);

$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?>">
                               

 RESULT   

blurImage(6, 70);

Radius = 6
Sigma = 70


1529849447bi.jpg

img/xtr/blu/1529849447bi.jpg apr

Abbey of Montserrat (ESP) - 2018.

  2 EXERCISE   

<?php

// Run several times 
 
$path PATH2IMGW '/xtr/1529861633.jpg';
    
$str2img 'img/xtr/blu/1529861633bi.jpg';
    
$radius mt_rand(010);
    
$sigma mt_rand(0100);

$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?>">
                               


blurImage(1, 29,imagick::CHANNEL_MAGENTA);

Radius = 1
Sigma = 29


1529861633bi.jpg

img/xtr/blu/1529861633bi.jpg apr

Sculpture by Igor Mitoraj [Eros Bendato] (POL) - 2018.