PHP | Gmagick annotateImage() Function Last Updated : 28 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Gmagick::annotateImage() function is an inbuilt function in PHP which is used to annotates an image with text. This function returns True on success. Syntax: Gmagick Gmagick::annotateimage( $GmagickDraw, $x, $y, $angle, $text ) Parameters: This function accepts five parameters as mentioned above and described below: $GmagickDraw: This parameter is used to create an GmagickDraw object that contains settings for drawing the text. $x: This parameter is set to horizontal offset in pixels to the left of text. $y: This parameter is set to vertical offset in pixels to the baseline of text. $angle: The angle at which to write the text. $text: The string which needs to draw. Return Value: This function returns Gmagick object with annotation made. Below programs illustrate the Gmagick::annotateImage() function in PHP: Program 1: php <?php /* Create some objects */ $image = new Gmagick(); $draw = new GmagickDraw(); $pixel = new GmagickPixel('white'); /* New image */ $image->newImage(800, 300, $pixel); /* Black text */ $draw->setFillColor('green'); /* Font properties */ $draw->setFont('Bookman-DemiItalic'); $draw->setFontSize( 30 ); /* Create text */ $image->annotateImage($draw, 30, 140, 0, 'GeeksforGeeks: A computer science portal'); /* Give image a format */ $image->setImageFormat('png'); /* Output the image with headers */ header('Content-type: image/png'); echo $image; ?> Output: Program 2: php <?php /* Create some objects */ $image = new Gmagick(); $draw = new GmagickDraw(); $image = new Gmagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); /* Black text */ $draw->setFillColor('green'); /* Font properties */ $draw->setFont('Bookman-DemiItalic'); $draw->setFontSize( 30 ); /* Create text */ $image->annotateImage($draw, 5, 120, 0, 'GeeksforGeeks: A computer science portal'); /* Give image a format */ $image->setImageFormat('png'); /* Output the image with headers */ header('Content-type: image/png'); echo $image; ?> Output: Reference: http://php.net/manual/en/gmagick.annotateimage.php Comment More infoAdvertise with us Next Article PHP | Gmagick annotateImage() Function R R_Raj Follow Improve Article Tags : Web Technologies PHP Image-Processing PHP-Gmagick Similar Reads PHP | Imagick annotateImage() Function The Imagick::annotateImage() function is an inbuilt function in PHP which is used to annotates an image with text. This function returns True on success. Syntax: bool Imagick::annotateImage( $draw_settings, $x, $y, $angle, $text ) Parameters: This function accepts five parameters as mentioned above 2 min read PHP | Gmagick addnoiseimage() Function The Gmagick::addnoiseimage() function is an inbuilt function in PHP which is used to add noise in given image. The intensity of noise depends on noise constants and channel types. The image noise is the random variation of brightness and contrast in an image. Syntax:Â Gmagick Gmagick::addnoiseimage 2 min read PHP | GmagickDraw annotate() Function The GmagickDraw::annotate() function is an inbuilt function in PHP which is used to draw the text on the image. Syntax: GmagickDraw GmagickDraw::annotate( float $x, float $y, string $text ) Parameters: This function accept three parameters as mentioned above and described below: $x: It specifies the 2 min read PHP | Gmagick enhanceimage() Function The Gmagick::enhanceimage() function is an inbuilt function in PHP which is used to improve the quality of a noisy image. This function applies the digital filter to improve quality.Syntax:Â Â Gmagick Gmagick::enhanceimage( void ) Parameters: This function does not accepts any parameter.Return Value: 1 min read PHP | Gmagick addImage() Function The Gmagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Gmagick object image list. This function adds a new image to Gmagick object from the current position of the source object. The Gmagick class have the ability to hold and operate on multiple images simu 2 min read Like