You are here

function image_imagick_sharpen in Imagick 7

Sharpens an image using imagick unsharpMaskImage().

See http://php.net/manual/en/imagick.unsharpmaskimage.php and http://www.imagemagick.org/script/command-line-options.php#unsharp

Parameters

$image: An image object. The $image->resource value will be modified by this call.

$radius: The radius of the sharpen. 0=auto.

$sigma: The standard deviation of the gaussian, in pixels.

$amount: The fraction of the difference between the original and the blur image that is added back into the original.

$threshold: The threshold, as a fraction of QuantumRange, needed to apply the difference amount.

Return value

TRUE or FALSE, based on success.

File

effects/imagick.sharpen.inc, line 22

Code

function image_imagick_sharpen(stdClass $image, $radius, $sigma, $amount, $threshold) {
  return $image->resource
    ->unsharpMaskImage($radius, $sigma, $amount, $threshold);
}