Annotate is from top left corner by default to baseline.
To make it relative to the center add -gravity center before the first annotation.
Annotate is just a short hand for the draw text command, but without needing double quotes, and providing the use of percent escapes.
any simpler command draw text with outer color like this?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: any simpler command draw text with outer color like this
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: any simpler command draw text with outer color like this
really good, thanks, I want this becoz xargs quite buggy in cmd, and 10+MB bat is terrible
>convert -size 500x500 xc:red -pointsize 100 -font Vademecum.ttf -pointsize 100 ^
-gravity center ^
-fill turquoise1 -annotate -2-2 test ^
-annotate -2+2 test ^
-annotate +2+2 test ^
-annotate +2-2 test ^
-annotate +0-2 test ^
-annotate -2+0 test ^
-annotate +0+2 test ^
-annotate +2+0 test ^
-fill red -annotate +0+0 test ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... m16WWtBcXM
>convert -size 500x500 xc:red -pointsize 100 -font "Vademecum.ttf" ^
-fill turquoise1 -stroke none -draw "gravity center text -2,-2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text -2, 2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 2, 2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 2,-2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 0,-2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text -2, 0 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 0, 2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 2, 0 'test'" ^
-fill red -stroke none -draw "gravity center text 0,0 'test'" ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... U9qYWFwemc
>convert -size 500x500 xc:red -pointsize 100 -font Vademecum.ttf -pointsize 100 ^
-gravity center ^
-fill turquoise1 -annotate -2-2 test ^
-annotate -2+2 test ^
-annotate +2+2 test ^
-annotate +2-2 test ^
-annotate +0-2 test ^
-annotate -2+0 test ^
-annotate +0+2 test ^
-annotate +2+0 test ^
-fill red -annotate +0+0 test ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... m16WWtBcXM
>convert -size 500x500 xc:red -pointsize 100 -font "Vademecum.ttf" ^
-fill turquoise1 -stroke none -draw "gravity center text -2,-2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text -2, 2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 2, 2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 2,-2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 0,-2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text -2, 0 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 0, 2 'test'" ^
-fill turquoise1 -stroke none -draw "gravity center text 2, 0 'test'" ^
-fill red -stroke none -draw "gravity center text 0,0 'test'" ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... U9qYWFwemc