Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Add Text to Image

To add some text to an image we use the annotate command, here also introducing gravity to place the text at the top, choosing 30pt font size and white text (default is black text):

$ display sample.jpg

$ convert sample.jpg -gravity North -pointsize 30 -fill white \
                     -annotate +0+100 'Visiting Singapore' output.jpg

$ display output.jpg

Figure 37.4: Adding text to an image.
Image im_marina_bay Image im_marina_bay_add_text


Copyright © 1995-2019 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of open source software including Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials of Data Science.