10

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)

1 Answer 1

15

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
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.