PHP | Gmagick labelimage() Function Last Updated : 23 Jan, 2020 Comments Improve Suggest changes Like Article Like Report The Gmagick::labelimage() function is an inbuilt function in PHP which is used to label to the image. A label is just a string attached to an image which can be extracted back later from the image. This label is not visible on the image itself but you can do so using annotate function. Syntax: mixed Gmagick::labelimage( string $label ) Parameters: This function accepts a single parameter $label which holds the label of an image. Return Value: This function returns the Gmagick object with the label. Exceptions: This function throws GmagickException on error. Below given programs illustrate the Gmagick::labelimage() function in PHP: Used Image: Program 1: php <?php // Create a new Gmagick object $gmagick = new Gmagick('geeksforgeeks.png'); $label = "Hello World"; // Label the image $gmagick->labelimage($label); // Get the label from image $label = substr($gmagick, -28, strlen($label) + 1); echo $label; ?> Output: Hello World Program 2: php <?php // Create a new Gmagick object $gmagick = new Gmagick('geeksforgeeks.png'); $label = "This is my label"; // Label the image $gmagick->labelimage($label); // Get the label from image $getlabel = substr($gmagick, -32, strlen($label)); // Create a GmagickDraw object $draw = new GmagickDraw(); // Set the color $draw->setFillColor('white'); // Function to draw rectangle $draw->rectangle(0, 0, 800, 400); // Set the fill color $draw->setFillColor('orange'); // Set the font size $draw->setfontsize(50); // Annotate a text $draw->annotate(30, 100, $getlabel); // Use of drawimage function $gmagick->drawImage($draw); // Display the output image header("Content-Type: image/png"); echo $gmagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/gmagick.labelimage.php Comment More infoAdvertise with us Next Article PHP | Gmagick labelimage() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Gmagick Similar Reads PHP | Imagick labelImage() Function The Imagick::labelImage() function is an inbuilt function in PHP which is used to add label to an image. Syntax: bool Imagick::labelImage( string $label ) Parameters: This function accepts a single parameter $label which holds the label to add to the image. Return Value: This function returns TRUE o 1 min read PHP | Gmagick levelimage() Function The Gmagick::levelimage() function is an inbuilt function in PHP which is used to adjust the levels of an image by scaling the colors falling between specified white and black points to the full available quantum range. Syntax: mixed Gmagick::levelimage( float $blackPoint, float $gamma, float $white 2 min read PHP | Gmagick implodeimage() Function The Gmagick::implodeimage() function is an inbuilt function in PHP which is used to creates a new image that is a copy of existing image. It uses the image pixels imploded by the specified percentage.Syntax:Â Â mixed Gmagick::implodeimage( $radius ) Parameters: This function accepts a single paramete 1 min read PHP | Imagick newImage() Function The Imagick::newImage() function is an inbuilt function in PHP which is used to creates a new image. This function creates a new image and associates ImagickPixel value as the background color. Syntax:Â bool Imagick::newImage( $cols, $rows, $background, $format ) Parameters: This function accepts fo 1 min read PHP | Imagick mapImage() Function The Imagick::mapImage() function is an inbuilt function in PHP which is used to replace the colors of an image with the closest color from a reference image. Syntax: bool Imagick::mapImage( Imagick $map, float $dither ) Parameters: This function accepts two parameters as mentioned above and describe 1 min read PHP | Gmagick magnifyimage() Function The Gmagick::magnifyimage() function is an inbuilt function in PHP which is used to scale an image proportionally to 2x. This function scales an image into twice of its original size.Syntax:Â Â public Gmagick::magnifyimage( void ) Parameters: This function does not accept any parameter.Return Value: 1 min read PHP | Imagick montageImage() Function The Imagick::montageImage() function is an inbuilt function in PHP which is used to create a composite image by combining the many separated images. This function composite the images into the tiles form with the name of image optionally. Syntax: Imagick Imagick::montageImage( ImagickDraw $draw, str 2 min read PHP | Gmagick motionblurimage() Function The Gmagick::motionblurimage() function is an inbuilt function in PHP which is used to simulates motion blur. This function convolves the image with a Gaussian operator of the given radius and standard deviation.Syntax:Â Â Gmagick Gmagick::motionblurimage( $radius, $sigma, $angle ) Parameters: This f 2 min read PHP | Gmagick minifyimage() Function The Gmagick::minifyimage() function is an inbuilt function in PHP which is used to scale an image proportionally to half of its original size. This function resizes the image into one-half of its original size.Syntax:Â Â Gmagick Gmagick::minifyimage( void ) Parameters: This function does not accepts 1 min read PHP | Gmagick medianfilterimage() Function The Gmagick::medianfilterimage() function is an inbuilt function in PHP which is used to apply a digital filter that improves the quality of a noisy image. This filter replaces each pixel by the median of its neighboring pixels which is defined by the radius. Syntax: void Gmagick::medianfilterimage( 2 min read Like