Using ImageMagick 6.8.1, my goal is to add text to the bottom left corner of an image and to have that text's background be black. Essentially, I want something like a 20x20 black area in the bottom left corner of my image and that black area to have some text. I've gotten everything figured out except for the black background portion.
This is what I have so far:
convert in.tif -pointsize 10 -background "#000000" -fill white -gravity SouthWest -draw "text 0,0 'a'" out.tif)
Try this, what you are looking for undercolor instead of background. Undercolor only fills the area covered by the text.
convert in.tif -undercolor Black -pointsize 10 -fill white -gravity SouthWest -annotate 0 'Text String' out.tif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With