Imagemagick command line help
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I need to write some text on top of an image and output the entire thing as a png. The overlay text needs to look a very specific way and aligned very specifically on top of the image.

here is the completed image

here is the background image

The font used is a Joanna MT Standard font. I found it freely online so here is a link to download

awarded to kerncy

Crowdsource coding tasks.

1 Solution

Winning solution


here is my command line :

convert splash_02-final.png -font Joanna-MT-Std-Bold_25333.ttf -pointsize 30 -fill black -draw "text 130,42 'IS-987'" -pointsize 24 -fill "#005288" -draw "text 28,72 'Sample Course'" -flatten outputfile.png
  • splash_02-final.png is your input image
  • font specify the ttf you want to use
  • pointsize and fill specify the first text size and color
  • draw text "IS-987" at position x=130, y=42
  • pointsize and fill specify the second text size and color
  • draw text "Sample Course" at position x=28, y=72
  • flatten it to the ouput outputfile.png

And here is your final image :

It is not pixel perfect, as I don't know the font size and color you used to create the text on the final image you showed us, but it is very easy to modify the parameters.

If you want to use a different font for the two texts, just add another -font parameter with the font name.

Do not hesitate if you have any question.

dude this is awesome! I'm going to post another bounty for a similar one. please check in about 5 min.
Qdev over 5 years ago