Imagick::haldClutImage

(PECL imagick 3)

Imagick::haldClutImageReplaces colors in the image

Descrição

public Imagick::haldClutImage ( Imagick $clut , int $channel = Imagick::CHANNEL_DEFAULT ) : bool

Replaces colors in the image using a Hald lookup table. Hald images can be created using HALD color coder.

Parâmetros

clut

Imagick object containing the Hald lookup image.

channel

Informa qualquer constante de canal válida no modo do canal. Para mais de um canal, combine as constantes de canal utilizando operações bitwise. O padrão é Imagick::CHANNEL_DEFAULT. Veja nessa lista de constantes de canal

Valor Retornado

Retorna true no sucesso.

Erros

Lança ImagickException em caso de erro.

Exemplos

Exemplo #1 Imagick::haldClutImage()

<?php
function haldClutImage($imagePath) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imagickPalette = new \Imagick(realpath("images/hald/hald_8.png"));
    
$imagickPalette->sepiatoneImage(55);
    
$imagick->haldClutImage($imagickPalette);
    
header("Content-Type: image/jpg");
    echo 
$imagick->getImageBlob();
}

?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top