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.
bool Imagick::annotateImage( $draw_settings, $x, $y, $angle, $text )
Parameters: This function accepts five parameters as mentioned above and described below:
- $draw_settings: This parameter is used to create an ImagickDraw 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 True on success.
Below programs illustrate the Imagick::annotateImage() function in PHP:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.