update : 2015.11.03
php.shukuma.com

검색:
 
 
Applies a solarizing effect to the image

Imagick::solarizeImage

(PECL imagick 2.0.0)

Imagick::solarizeImageApplies a solarizing effect to the image

설명

bool Imagick::solarizeImage ( int $threshold )

Applies a special effect to the image, similar to the effect achieved in a photo darkroom by selectively exposing areas of photo sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a measure of the extent of the solarization.

인수

threshold

반환값

성공시에 TRUE를 반환합니다.

예제

Example #1 Imagick::solarizeImage()

<?php
function solarizeImage($imagePath$solarizeThreshold) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imagick->solarizeImage($solarizeThreshold * \Imagick::getQuantum());
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>