Imagick::linearStretchImage

(PECL imagick 2, PECL imagick 3)

Imagick::linearStretchImageGörüntünün koyuluğunu doygunluk ile abartır

Açıklama

public Imagick::linearStretchImage(float $siyah_nokta, float $beyaz_nokta): bool

Görüntünün koyuluğunu doygunluk ile abartır.

Bağımsız Değişkenler

siyah_nokta

Görüntünün siyah noktası.

beyaz_nokta

Görüntünün beyaz noktası

Dönen Değerler

Başarı durumunda true döner.

Örnekler

Örnek 1 - Imagick::linearStretchImage() örneği

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

?>