HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Adaptive sharpen image

← adaptiveResizeImage   adaptiveThresholdImage →
Adaptively sharpen the image by sharpening more intensely near image edges and less intensely far from edges. This method is available if Imagick has been compiled against ImageMagick version 6.2.9 or newer.

Example

function adaptiveSharpenImage($image_path, $radius, $sigma, $channel)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->adaptiveSharpenImage($radius, $sigma, $channel);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}