(PECL imagick 2, PECL imagick 3)
Imagick::linearStretchImage — Étire la saturation de l'intensité de l'image
Étire la saturation de l'intensité de l'image.
blackPointLe point noir de l'image.
whitePointLe point blanc de l'image.
Retourne true en cas de succès.
Exemple #1 Exemple avec 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();
}
?>