any simpler command draw text with outer color like this?

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?".
User avatar
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

Post by anthony »

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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
kissson
Posts: 14
Joined: 2012-05-15T02:15:32-07:00
Authentication code: 13

Re: any simpler command draw text with outer color like this

Post by kissson »

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
Post Reply