PHP | Gmagick getimagemattecolor() Function Last Updated : 21 Jan, 2020 Comments Improve Suggest changes Like Article Like Report 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 the color of matte. Exceptions: This function throws GmagickException on error. Below given programs illustrate the Gmagick::getimagemattecolor() function in PHP: Used Image: Program 1: php <?php // Create a new Gmagick object $gmagick = new Gmagick('geeksforgeeks.png'); // Get the matte color $colorPixel = $gmagick->getimagemattecolor(); echo $colorPixel->getcolor(); ?> Output: rgb(48573, 48573, 48573) Program 2: php <?php // Create a new Gmagick object $gmagick = new Gmagick('geeksforgeeks.png'); // Set the matte color $gmagick->setimagemattecolor('green'); // Get the matte color $colorPixel = $gmagick->getimagemattecolor(); echo $colorPixel->getcolor(); ?> Output: rgb(0, 32896, 0) Reference: https://www.php.net/manual/en/gmagick.getimagemattecolor.php Comment More infoAdvertise with us Next Article PHP | Gmagick getimagemattecolor() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Gmagick Similar Reads 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 | Gmagick getImageMatte() Function 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 channe 1 min read PHP | Gmagick getimagecolors() Function The Gmagick::getimagecolors() function is an inbuilt function in PHP which is used to get the number of unique colors in the image. Syntax: int Gmagick::getimagecolors( void ) Parameters:This function doesnât accept any parameter. Return Value: This function returns an integer value. Exceptions: Thi 2 min read 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 getimagebordercolor() Function The Gmagick::getimagebordercolor() function is an inbuilt function in PHP which is used to get the image border color. Syntax: Gmagickpixel Gmagick::getimagebordercolor( void ) Parameters:This function doesnât accept any parameter. Return Value: This function returns an Gmagickpixel object containin 1 min read Like