PHP | Imagick clutImage() Function Last Updated : 21 Sep, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report The Imagick::clutImage() function is an inbuilt function in PHP which is used to replace the colors in the image. The second parameter of this function replaces the color in a specific channel. Syntax: bool Imagick::clutImage( $lookup_table, $channel = Imagick::CHANNEL_DEFAULT ) Parameters: This function accepts two parameters as mentioned above and described below: $lookup_table: This parameter containing Imagick object for color lookup table.$channel: It is the channel constants which provides any channel that is valid for your channel mode. The default value of $channel is Imagick::CHANNEL_DEFAULT. Return Value: This function returns True on success or false on failure. Below program illustrates the Imagick::clutImage() function in PHP: Program: PHP <?php // Declare an Imagick object $image = new Imagick( 'https://write.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-17.png'); $clut = new Imagick(); // Imagick object chosen green color from color lookup table $clut->newImage(1, 1, new ImagickPixel('green')); // No channel is applied hence default channel is used $image->clutImage($clut); header("Content-Type: image/jpg"); // Display the output image echo $image->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagick.clutimage.php Comment More infoAdvertise with us Next Article PHP | Imagick cropImage() Function V VigneshKannan3 Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick clampImage() Function The Imagick::clampImage() function is an inbuilt function in PHP which is used to restricts the color range from 0 to the quantum depth. This function has no impact on the image which is already in given range. Syntax: bool Imagick::clampImage( int $channel = Imagick::CHANNEL_DEFAULT ) Parameters: T 1 min read PHP | Imagick cropImage() Function The Imagick::cropImage() function is an inbuilt function in PHP which is used to extracts the region of the image.Syntax:  int Imagick::cropImage( $width, $height, $x, $y ) Parameters: This function accept four parameters as mention above and describe below.  $width: This parameter is used to spec 2 min read PHP | Imagick addImage() Function The Imagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Imagick object image list. After the operation iterator position is moved at the end of the list. This function adds new image to Imagick object from the current position of the source object. The Imagi 1 min read PHP | Imagick flattenImages() Function The Imagick::flattenImages() function is an inbuilt function in PHP which is used to merges the sequence of images. This is useful for combining Photoshop layers into a single image. Syntax: Imagick Imagick::flattenImages( void ) Parameters: This function does not accept any parameter. Return Value: 1 min read PHP | Imagick colorizeImage() Function The Imagick::colorizeImage() function is an inbuilt function in PHP which is used to blends the fill color with each pixel in the image with a specified opacity. Syntax: bool Imagick::colorizeImage( mixed $colorize, mixed $opacity, bool $legacy = FALSE ) Parameters: This function accepts three param 2 min read PHP | Imagick drawImage() Function The Imagick::drawImage() function is an inbuilt function in PHP which is used to render the ImagickDraw object on the Imagick object. It is used to draw the image on the Imagick instance. We set an image matrix, parameters and the borders of the drawn image with the help of ImagickDraw methods and t 2 min read Like