Imagick::haldClutImage
PHP function
Edit on GitHub ✎
(PECL imagick 3)
Replaces colors in the image
Description
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.
Parameters
clutImagick object containing the Hald lookup image.
channelChannel
Return Values
Success
Errors/Exceptions
Throws
Examples
php
<?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();
}
?>