Imagick::selectiveBlurImage
PHP function
Edit on GitHub ✎
(PECL imagick 3 >= 3.3.0)
Selectively blur an image within a contrast threshold
Description
Imagick::selectiveBlurImage(float $radius, float $sigma, float $threshold, int $channel = Imagick::CHANNEL_DEFAULT): bool
Selectively blur an image within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.
Parameters
radiussigmathresholdchannelChannel
Return Values
Success
Examples
php
<?php
function selectiveBlurImage($imagePath, $radius, $sigma, $threshold, $channel) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->selectiveBlurImage($radius, $sigma, $threshold, $channel);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>