Change language

PHP Imagick gaussianBlurImage () function

Note:Radius must be larger than sigma for reasonable results.Syntax:
 bool Imagick::gaussianBlurImage ($radius, $sigma, $channel = Imagick::CHANNEL_DEFAULT)
Parameters:this function takes three parameters as above and described below :
  • $radius (floating point type):this parameter specifies the radius of the gaussian area in pixels, excluding the center pixel.
  • $sigma (floating point type):this parameter sets the standard deviation of the Gaussian area in pixels.
  • $channel (Int type):this parameter gives the channel (which is valid) according to our request. To apply more than one channel, use the bitwise operator to concatenate the channel type constants.
Return Value:This function returns True on success.Errors:This function throws an ImagickException on error.Original Image: Now we will write a PHP program that illustrates the Imagick::gaussianBlurImage() function PHP to blur the image above.Program:This program uses the Imagick::gaussianBlurImage() function to blur the image.  
// Create a Imagick object $imagick = new Imagick ( );  
// Use the gaussianBlurImage() function to blur the image $imagick -> gaussianBlurImage (10, 8, Imagick::CHANNEL_DEFAULT);  
// Image title header ( "Content-Type: image / jpg" );  
// Display the output image echo $imagick -> getImageBlob();  
SO 1 data error