Hi there,
Is there a way to define a bounding box for the Caption option? Right now I have this:
convert -alpha on -background #00000050 -fill white -size 800x600 -gravity Center caption:"Test 1 2 3" png32:temp.png
and this centers the text nicely using the largest font possible. But let's say I wish to define a smaller area inside my image for the text so it doesn't extend all the way to the sides and top and bottom. For example, the final image is 800x600, but I never want text to be displayed outside an imaginary box of 700x550 located at the centre of the image, sort of like padding for the text. I hope that makes sense.
Thanks
Caption inside Bounding Box
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Caption inside Bounding Box
You need to create the text file with -size 700x550 and then composite it over your larger image or use -extent or -border to expand the size of the text image. See http://www.imagemagick.org/Usage/crop/#border and http://www.imagemagick.org/Usage/crop/#extent