php8.5
Home/ Manual/ imagick / imagick/ Imagick::adaptiveSharpenImage

Imagick::adaptiveSharpenImage

PHP function Edit on GitHub ✎

(PECL imagick 2, PECL imagick 3)

Adaptively sharpen the image

Description

Imagick::adaptiveSharpenImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool

Adaptively sharpen the image by sharpening more intensely near image edges and less intensely far from edges. 0x629

Parameters

radius

The radius of the Gaussian, in pixels, not counting the center pixel. Use 0 for auto-select.

sigma

The standard deviation of the Gaussian, in pixels.

channel

Channel

Return Values

Success

Examples

A Imagick::adaptiveSharpenImage() example

Adaptively sharpen the image with radius 2 and sigma 1.

php
<?php
try {
    $image = new Imagick('image.png');
    $image->adaptiveSharpenImage(2,1);
} catch(ImagickException $e) {
    echo 'Error: ' , $e->getMessage();
    die();
}
header('Content-type: image/png');
echo $image;
?>

See Also

Source: reference/imagick/imagick/adaptivesharpenimage.xml · from the official PHP manual (php/doc-en)