PHP | Gmagick getImageMatte() Function Last Updated : 10 Jan, 2022 Comments Improve Suggest changes Like Article Like Report The Gmagick::getImageMatte() function is an inbuilt function in PHP which is used to get the matte channel of an Gmagick object. Syntax: int Gmagick::getimagematte( void ) Parameters: This function does not accept any parameter. Return Value: This function returns True if image contains matte channel or False otherwise. Below programs illustrate the Gmagick::getImageMatte() function in PHP: Original Image: Program 1: php <?php // Create new Gmagick object $gmagick = new Gmagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-15.png'); // Using getImageMatte function $res = $Gmagick->getImageMatte(); // header("Content-Type: image/jpg"); echo $res; ?> Output: 1 Original Image 2: Program 2: php <?php $string = "Computer Science portal for Geeks!"; // Creating new image of above String // and add color $im = new Gmagick(); $draw = new GmagickDraw(); // Fill the color in image $draw->setFillColor(new GmagickPixel('green')); // Set the text font size $draw->setFontSize(50); $matrix = $im->queryFontMetrics($draw, $string); $draw->annotation(0, 40, $string); $im->newImage($matrix['textWidth'], $matrix['textHeight'], new GmagickPixel('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/gmagick.getimagematte.php Comment More infoAdvertise with us Next Article PHP | Gmagick getImageMatte() Function R R_Raj Follow Improve Article Tags : Web Technologies PHP Image-Processing PHP-function PHP-Gmagick +1 More Similar Reads PHP | Imagick getImageMatte() Function 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 1 min read PHP | Gmagick getimageformat() Function The Gmagick::getimageformat() function is an inbuilt function in PHP which returns the format of an image. Syntax: string Gmagick::getimageformat( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns the image format in form of string on success. Below 1 min read PHP | Gmagick getimagetype() Function The Gmagick::getimagetype() function is an inbuilt function in PHP which is used to get the image type. Syntax: int Gmagick::getimagetype( void ) Parameters: This function doesnât accept any parameters. Return Value: This function returns an integer value corresponding to one of the IMGTYPE constant 1 min read PHP | Gmagick getimagemattecolor() Function The Gmagick::getimagemattecolor() function is an inbuilt function in PHP which is used to get the image matte color. Syntax: GmagickPixel Gmagick::getimagemattecolor( void ) Parameters: This function doesnât accept any parameters. Return Value: This function returns a GmagickPixel object containing 1 min read PHP | Gmagick getimagegamma() Function The Gmagick::getimagegamma() function is an inbuilt function in PHP which is used to get the image gamma. The Gamma is a nonlinear operation used to encode and decode luminance or tristimulus values in images. Syntax: float Gmagick::getimagegamma( void ) Parameters: This function doesnât accept any 1 min read Like