array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'imagick.linearstretchimage.php', 1 => 'Imagick::linearStretchImage', 2 => 'Stretches with saturation the image intensity', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.levelimage.php', 1 => 'Imagick::levelImage', ), 'next' => array ( 0 => 'imagick.liquidrescaleimage.php', 1 => 'Imagick::liquidRescaleImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/linearstretchimage.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Imagick::linearStretchImage

(PECL imagick 2, PECL imagick 3)

Imagick::linearStretchImageStretches with saturation the image intensity

Beschreibung

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

Stretches with saturation the image intensity.

Parameter-Liste

blackPoint

The image black point

whitePoint

The image white point

Rückgabewerte

Liefert true bei Erfolg.

Beispiele

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

?>