PHP | Imagick getImageMatte() Function Last Updated : 30 Dec, 2021 Comments Improve Suggest changes Like Article Like Report The Imagick::getImageMatte() function is an inbuilt function in PHP which is used to get the matte channel of an imagick object.Syntax: bool Imagick::getImageMatte( void ) Parameters: This function does not accept any parameter.Return Value: This function returns True if image has a matte channel or False otherwise.Below programs illustrate the Imagick::getImageMatte() function in PHP:Program 1: Original Image: php <?php // Create new Imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-15.png'); // Using getImageMatte function $res = $imagick->getImageMatte(); // header("Content-Type: image/jpg"); echo $res; ?> Output: 1 Program 2: Original Image: php <?php $string = "Computer Science portal for Geeks!"; // Creating new image of above String // and add color $im = new Imagick(); $draw = new ImagickDraw(); // Fill the color in image $draw->setFillColor(new ImagickPixel('green')); // Set the text font size $draw->setFontSize(50); $metrix = $im->queryFontMetrics($draw, $string); $draw->annotation(0, 40, $string); $im->newImage($metrix['textWidth'], $metrix['textHeight'], new ImagickPixel('white')); // Draw the image $im->drawImage($draw); $im->setImageFormat('jpeg'); $res = $im->getImageMatte(); // Display Result echo $res; ?> Output: 1 Reference: http://php.net/manual/en/imagick.getimagematte.php Comment More infoAdvertise with us Next Article PHP | Imagick getImageMatte() Function R R_Raj Follow Improve Article Tags : Web Technologies PHP Image-Processing PHP-function PHP-Imagick +1 More Similar Reads PHP | Imagick getImageType() Function The Imagick::getImageType() function is an inbuilt function in PHP which is used to get the potential image type. Syntax: int Imagick::getImageType( void ) Parameters: This function doesnât accepts any parameter. Return Value: This function returns an integer value corresponding to one of IMGTYPE co 1 min read PHP | Imagick getImageFormat() Function The Imagick::getImageFormat() function is an inbuilt function in PHP which is used to get the format of a particular image in a sequence Syntax:  string Imagick::getImageFormat( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns a string of the imag 1 min read PHP | Imagick getImagePage() Function The Imagick::getImagePage() function is an inbuilt function in PHP which is used to get the page geometry of a particular image. Syntax: array Imagick::getImagePage( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns an array associated with the page 2 min read PHP | Imagick getImageMatteColor() Function The Imagick::getImageMatteColor() function is an inbuilt function in PHP which is used to get the image matte color. Syntax: ImagickPixel Imagick::getImageMatteColor( void ) Parameters: This function does not accept any parameter. Return Value: This function returns ImagickPixel object containing im 1 min read PHP | Imagick getImageGamma() Function The Imagick::getImageGamma() function is an inbuilt function in PHP which is used to get the Gamma value of the image. The Gamma is a nonlinear operation used to encode and decode luminance or tristimulus values in images. Syntax: float Imagick::getImageGamma( void ) Parameters: This function does n 1 min read Like