(PECL imagick 3 >= 3.3.0)
Imagick::selectiveBlurImage — 在对比度阈值内选择性地模糊图像
$radius,$sigma,$threshold,$channel = Imagick::CHANNEL_DEFAULT在对比度阈值内选择性地模糊图像。它类似于锐化蒙版,锐化对比度高于某个阈值的所有内容。
radius
sigma
threshold
channel提供对您的通道模式有效的任何通道常量。要应用于多个通道,请使用按位运算符组合 通道常量。默认为 Imagick::CHANNEL_DEFAULT。请参阅此 通道常量 列表
成功时返回 true。
示例 #1 Imagick::selectiveBlurImage()
<?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();
}
?>