Thursday, July 4, 2024
HomeLanguagesPhpPHP | Imagick adaptiveSharpenImage() Function

PHP | Imagick adaptiveSharpenImage() Function

The Imagick::adaptiveSharpenImage() function is an inbuilt function in PHP which provides an adaptive sharpen image feature to the image. The intensity of an adaptive sharpen image depends on dramatically decreased at the edge of the image. Syntax:

bool Imagick::adaptiveSharpenImage ( $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 than one channel can be combined using bitwise operator. The defaults channel in Imagick function is Imagick::CHANNEL_DEFAULT.

Return Value: This function returns TRUE on success. Below programs illustrate the Imagick::adaptiveSharpenImage() function in PHP: Original Image: original image link Program: 

php




<?php
 
// require_once('path/to/vendor/autoload.php');
 
header('Content-type: image/png');
 
$image = new Imagick(
 
$image->adaptiveSharpenImage(19, 8);
echo $image;
?>


Output: adaptive sharpen image Reference: http://php.net/manual/en/imagick.adaptivesharpenimage.php

Nicole Veronica Rubhabha
Nicole Veronica Rubhabha
A highly competent and organized individual DotNet developer with a track record of architecting and developing web client-server applications. Recognized as a personable, dedicated performer who demonstrates innovation, communication, and teamwork to ensure quality and timely project completion. Expertise in C#, ASP.Net, MVC, LINQ, EF 6, Web Services, SQL Server, MySql, Web development,
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments