Add text on image at specific point using imagemagick

convert -pointsize 40 -fill blue -draw 'text 600,600 "Love You Mom"' temp1.jpg temp2.jpg
                                              ^   ^
                                              |   |
                                        From Left |
                                                From Top

Try using -gravity North (this will move your text to the top of the image) and then adding an offset (-annotate +0+100) to move down your text:

convert temp.jpg -gravity North -pointsize 30 -annotate +0+100 'Love you mom' temp1.jpg 

Instead, you can use -draw to specify the location you want your text.

For example:

convert -font helvetica -fill white -pointsize 60 -gravity center -draw "text 0,300 'TEXT TO BE DISPLAYED'" /image_address/Image_input.png /image_address/Image_output.png 

In this case, 0 is de x coordinate and 300 is the y coordinate, however the x coordinate is not really important since the -gravity center is already there.

Remember that the coordinate 0,0 is the top left corner.

Tags:

Imagemagick