PHP | Imagick adaptiveBlurImage() Function
The Imagick::adaptiveBlurImage() function is an inbuilt function in PHP which is used to add adaptive blur filter in the given image. The intensity of an adaptive blur depends is dramatically decreased at the edge of the image, whereas a standard blur is a uniform across the image. This effect makes the image unclear or less distinct.
Syntax:
bool adaptiveBlurImage ( $radius, $sigma, $channel )
Parameters: This function accepts three parameters as mentioned above and described below:
- $radius: This parameter is used to set the radius of the Gaussian, in pixels. Its not counting the center pixel. If radius value is zero it means radius will be chosen automagically.
- $sigma: This parameter is used to find the standard deviation of the Gaussian, in pixels.
- $channel: This parameter provides the channel constant that is valid for channel mode. More then one channel can be combined using bitwise operator. The defaults channel in Imagick function is Imagick::CHANNEL_DEFAULT.
Some color constant of channel list are given below:- imagick::COLOR_BLACK (integer)
- imagick::COLOR_BLUE (integer)
- imagick::COLOR_CYAN (integer)
- imagick::COLOR_GREEN (integer)
- imagick::COLOR_RED (integer)
- imagick::COLOR_YELLOW (integer)
- imagick::COLOR_MAGENTA (integer)
- imagick::COLOR_OPACITY (integer)
- imagick::COLOR_ALPHA (integer)
- imagick::COLOR_FUZZ (integer)
Return Value: This function returns TRUE on success.
Exception: This function throws ImagickException on error.
Below programs illustrate the Imagick::adaptiveBlurImage() function in PHP:
Original Image:

Program:
<?php // require_once('path/to/vendor/autoload.php'); header('Content-type: image/png'); $image = new Imagick( $image->adaptiveBlurImage(20, 5); echo $image; ?> |
Output:

Reference: http://php.net/manual/en/imagick.adaptiveblurimage.php
Recommended Posts:
- PHP | Imagick clutImage() Function
- PHP | Imagick deskewImage() Function
- PHP | Imagick orderedPosterizeImage() Function
- PHP | Imagick getImageChannelDepth() Function
- PHP | Imagick oilPaintImage() Function
- PHP | Imagick setImageChannelDepth() Function
- PHP | Imagick compositeImage() Function
- PHP | Imagick hasPreviousImage() Function
- PHP | Imagick getImageChannelRange() Function
- PHP | Imagick getImageBluePrimary() Function
- PHP | Imagick newPseudoImage() Function
- PHP | Imagick normalizeImage() Function
- PHP | Imagick getImageWhitePoint() Function
- PHP | Imagick cropThumbnailImage() Function
- PHP | Imagick sharpenImage() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



