Resize image, then annotate with autosize text - how?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
skribb
Posts: 4
Joined: 2015-01-28T05:11:26-07:00
Authentication code: 6789

Resize image, then annotate with autosize text - how?

Post by skribb »

I'm trying to resize an image and then annotate it with autosizing text that should fit the 512x512 image canvas. This is my code:

Code: Select all

convert "folder.jpg" -resize "512x512^" -gravity center -crop 512x512+0+0 +repage "folder.jpg"
SLEEP 1
convert -size 512x512 xc:none -gravity southeast -stroke white -strokewidth 50 -annotate 0 "test" -blur 0x15 -background none -stroke none -fill black -annotate 0 "test" "folder.jpg" +swap  -gravity southeast -geometry +0-3 -composite "folder.jpg"
The resize and crop seems to be working alright, but the annotation becomes tiny. if I specify a pointsize, it won't autosize, so am I doing something wrong? :shock:


thanks guys
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resize image, then annotate with autosize text - how?

Post by snibgo »

"-annotate" won't auto-size text.

"label:" will auto-size text. Use this to create a new image, and composite that over your required image.
snibgo's IM pages: im.snibgo.com
skribb
Posts: 4
Joined: 2015-01-28T05:11:26-07:00
Authentication code: 6789

Re: Resize image, then annotate with autosize text - how?

Post by skribb »

Oh, i see. thanks
Post Reply