update : 2015.11.03
php.shukuma.com

검색:
 
 
Stretches with saturation the image intensity

Imagick::linearStretchImage

(PECL imagick 2.0.0)

Imagick::linearStretchImageStretches with saturation the image intensity

설명

bool Imagick::linearStretchImage ( float $blackPoint , float $whitePoint )

Stretches with saturation the image intensity.

인수

blackPoint

The image black point

whitePoint

The image white point

반환값

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

예제

Example #1 Imagick::linearStretchImage()

<?php
function linearStretchImage($imagePath$blackThreshold$whiteThreshold) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$pixels $imagick->getImageWidth() * $imagick->getImageHeight();
    
$imagick->linearStretchImage($blackThreshold $pixels$whiteThreshold $pixels);

    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>