Imagick::linearStretchImage

(PECL imagick 2, PECL imagick 3)

Imagick::linearStretchImageEstica com saturação a intensidade da imagem

Descrição

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

Estica com saturação a intensidade da imagem.

Parâmetros

blackPoint

O ponto preto da imagem.

whitePoint

O ponto branco da imagem.

Valor Retornado

Retorna true em caso de sucesso.

Exemplos

Exemplo #1 Exemplo de 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();
}

?>