Page 1 of 1
How to insert a caption below an image?
Posted: 2017-05-31T09:39:48-07:00
by Chemist116
Hello. I am trying to reproduce the effect similar to the example attached. I've already read the tutorial
here however the result is not the desired. Can somebody help me with this?.
What i need is that the text to be in courier new typeface and fontcolor to be yellow instead of white as in the example, but the rest is fine as black background color and to be centered in the near bottom of the picture.
Re: How to insert a caption below an image?
Posted: 2017-05-31T09:55:33-07:00
by fmw42
Do you want the text inside the image at or near the bottom or added below the bottom of the image.
What is your ImageMagick version and platform/OS, since syntax may differ?
Try something like:
Code: Select all
convert input.suffx -gravity south -undercolor black -fill yellow -font courier -pointsize 18 -annotate +0+20 "This Is Some Text" result.suffix
Re: How to insert a caption below an image?
Posted: 2017-05-31T13:09:30-07:00
by Chemist116
fmw42 wrote: ↑2017-05-31T09:55:33-07:00
Do you want the text inside the image at or near the bottom or added below the bottom of the image.
What is your ImageMagick version and platform/OS, since syntax may differ?
Try something like:
Code: Select all
convert input.suffx -gravity south -undercolor black -fill yellow -font courier -pointsize 18 -annotate +0+20 "This Is Some Text" result.suffix
I want to make if possible a replica of the example provided just that the blackbox has to have yellowfont color and to be it courier new. It has to be positioned near the bottom inside the image exactly as the example. I'm using windows 7 and the version of image magick im on is imagemagick 6.9.3-2-q16-hdri-x86-dll, which way do you recommend?.
Re: How to insert a caption below an image?
Posted: 2017-05-31T13:44:03-07:00
by GeeMack
Chemist116 wrote: ↑2017-05-31T13:09:30-07:00I want to make if possible a replica of the example provided just that the blackbox has to have yellowfont color and to be it courier new. It has to be positioned near the bottom inside the image exactly as the example. I'm using windows 7 and the version of image magick im on is imagemagick 6.9.3-2-q16-hdri-x86-dll, which way do you recommend?.
The command
fmw42 showed you should do almost exactly that. Where he has "input.suffx" you need to put the name of your input image, and where he used "result.suffix" you'll put whatever name you want for your output image.
You might have to run a few tests to see how far up from the bottom you want it. Adjust that in the "-annotate" operation by increasing or decreasing the second number where the example has a 20. That "+0+20" would put your label centered left to right and 20 pixels up from the bottom.
Also, on a Windows system you might need to use "-font courier-new" instead of just "-font courier".