(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();
}
?>