Imagick::linearStretchImage

(PECL imagick 2.0.0)

Imagick::linearStretchImageÉtire la saturation de l'intensité de l'image

Description

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

Étire la saturation de l'intensité de l'image.

Liste de paramètres

blackPoint

Le point noir de l'image.

whitePoint

Le point blanc de l'image.

Valeurs de retour

Retourne TRUE en cas de succès.

Exemples

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

?>