Open In App

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:

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

Article Tags :