any simpler command draw text with outer color like this?
any simpler command draw text with outer color like this?
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
thx
-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
thx
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any simpler command draw text with outer color like this
Perhaps you can provide links to your input and output images and also tell us what version of IM you are using.
Re: any simpler command draw text with outer color like this
>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
-stroke not help
>convert -size 500x500 xc:red -pointsize 100 -font "Vademecum.ttf" ^
-fill red -stroke turquoise1 -strokewidth 2 -draw "gravity center text 0,0 'test'" ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... Wp1amdyUFE
this also not help
convert -size 500x500 xc:red -pointsize 100 -font "Vademecum.ttf" ^
-fill red -stroke turquoise1 -strokewidth 2 -draw "gravity center text 0,0 'test'" ^
-fill red -stroke none -draw "gravity center text 0,0 'test'" ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... 3E3TGdGMVk
-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
-stroke not help
>convert -size 500x500 xc:red -pointsize 100 -font "Vademecum.ttf" ^
-fill red -stroke turquoise1 -strokewidth 2 -draw "gravity center text 0,0 'test'" ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... Wp1amdyUFE
this also not help
convert -size 500x500 xc:red -pointsize 100 -font "Vademecum.ttf" ^
-fill red -stroke turquoise1 -strokewidth 2 -draw "gravity center text 0,0 'test'" ^
-fill red -stroke none -draw "gravity center text 0,0 'test'" ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... 3E3TGdGMVk
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any simpler command draw text with outer color like this
Is this what you want?
I create an image of the text in white on black. Then colorize the white with turquoise. Then make the background transparent. The composite it over the red image in the center.
convert -respect-parenthesis \( -size 500x500 xc:red \) \
\( -background black -fill white -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" \
-edge 2 -transparent white -background turquoise1 -flatten -transparent black \) \
-gravity center -compose over -composite result.jpg
The above is unix. Remove the \ before the parens and change the line ending \ to ^ for windows.
You can find docs for each command at http://www.imagemagick.org/script/comma ... ptions.php and examples and explanations for their use at http://www.imagemagick.org/Usage/ and http://www.imagemagick.org/Usage/reference.html
I create an image of the text in white on black. Then colorize the white with turquoise. Then make the background transparent. The composite it over the red image in the center.
convert -respect-parenthesis \( -size 500x500 xc:red \) \
\( -background black -fill white -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" \
-edge 2 -transparent white -background turquoise1 -flatten -transparent black \) \
-gravity center -compose over -composite result.jpg
The above is unix. Remove the \ before the parens and change the line ending \ to ^ for windows.
You can find docs for each command at http://www.imagemagick.org/script/comma ... ptions.php and examples and explanations for their use at http://www.imagemagick.org/Usage/ and http://www.imagemagick.org/Usage/reference.html
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any simpler command draw text with outer color like this
Actually this may be easier to understand.
# create white on black text image and make it an edge outline
# create turquoise image the same size
# create red image the same size
# reverse their order
# composite the turquoise onto the red image using the text image as a mask
# extend the red background to your desired size
convert \
\( -background black -fill white -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" -edge 2 \) \
\( -clone 0 -fill turquoise -colorize 100% \) \
\( -clone 1 -fill red -colorize 100% \) \
-reverse -compose over -composite -gravity center -background red -extent 500x500 \
result.jpg
# create white on black text image and make it an edge outline
# create turquoise image the same size
# create red image the same size
# reverse their order
# composite the turquoise onto the red image using the text image as a mask
# extend the red background to your desired size
convert \
\( -background black -fill white -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" -edge 2 \) \
\( -clone 0 -fill turquoise -colorize 100% \) \
\( -clone 1 -fill red -colorize 100% \) \
-reverse -compose over -composite -gravity center -background red -extent 500x500 \
result.jpg
Re: any simpler command draw text with outer color like this
I will stick to my vvvery long command
https://docs.google.com/file/d/0Bz3bfdI ... Fwemc/edit
because the shortened one,
https://docs.google.com/file/d/0Bz3bfdI ... RYVGs/edit
(do windows and linux produce the same output ?)
https://docs.google.com/file/d/0Bz3bfdI ... Fwemc/edit
because the shortened one,
https://docs.google.com/file/d/0Bz3bfdI ... RYVGs/edit
(do windows and linux produce the same output ?)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any simpler command draw text with outer color like this
kissson wrote:I will stick to my vvvery long command
https://docs.google.com/file/d/0Bz3bfdI ... Fwemc/edit
because the shortened one,
https://docs.google.com/file/d/0Bz3bfdI ... RYVGs/edit
(do windows and linux produce the same output ?)
Window syntax is different from unix. In windows, remove the \ from parenthesis and end the lines with ^ rather than \. Also you need to escape the % with %%. See http://www.imagemagick.org/Usage/windows/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any simpler command draw text with outer color like this
try this, but change the path to the font to your path and not mine
convert ^
( -background black -fill white -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" -edge 2 ) ^
( -clone 0 -fill turquoise -colorize 100% ) ^
( -clone 1 -fill red -colorize 100%% ) ^
-reverse -compose over -composite -gravity center -background red -extent 500x500 \
result.jpg
convert ^
( -background black -fill white -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" -edge 2 ) ^
( -clone 0 -fill turquoise -colorize 100% ) ^
( -clone 1 -fill red -colorize 100%% ) ^
-reverse -compose over -composite -gravity center -background red -extent 500x500 \
result.jpg
Re: any simpler command draw text with outer color like this
I am on windows, I have the font with the same path to convert.exe
please view the link above and you know the image each command produce
thanks
please view the link above and you know the image each command produce
thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any simpler command draw text with outer color like this
I identified that above in my earlier post. but it iskissson wrote:I am on windows, I have the font with the same path to convert.exe
please view the link above and you know the image each command produce
thanks
# create white on black text image and make it an edge outline
# create turquoise image the same size
# create red image the same size
# reverse their order
# composite the turquoise onto the red image using the text image as a mask
# extend the red background to your desired size
convert ^
( -background black -fill white -pointsize 100 -font vademecum.ttf label:"test" -edge 2 ) ^ <--- text image
( -clone 0 -fill turquoise -colorize 100% ) ^ <--- turquoise image
( -clone 1 -fill red -colorize 100%% ) ^ <--- red image
-reverse -compose over -composite -gravity center -background red -extent 500x500 \
result.jpg
Note that my font was named Vademecu.ttf not Vademecum.ttf So change yours as here.
Re: any simpler command draw text with outer color like this
VADEMECU.TTF from http://www.fontonic.com/download.asp?id=6421
(cd into IMv6.7.8-8)
convert ^
( -background black -fill white -pointsize 100 -font vademecu.ttf label:"test" -edge 2 ) ^
( -clone 0 -fill turquoise -colorize 100% ) ^
( -clone 1 -fill red -colorize 100%% ) ^
-reverse -compose over -composite -gravity center -background red -extent 500x500 ^
result.jpg
https://docs.google.com/file/d/0Bz3bfdI ... FWQXc/edit
convert ^
( -background black -fill white -pointsize 100 -font vademecu.ttf label:"test" -edge 2 ) ^
( -clone 0 -fill turquoise -colorize 100%% ) ^
( -clone 1 -fill red -colorize 100%% ) ^
-reverse -compose over -composite -gravity center -background red -extent 500x500 ^
result.jpg
https://docs.google.com/file/d/0Bz3bfdI ... pPblU/edit
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/file/d/0Bz3bfdI ... Fwemc/edit
(cd into IMv6.7.8-8)
convert ^
( -background black -fill white -pointsize 100 -font vademecu.ttf label:"test" -edge 2 ) ^
( -clone 0 -fill turquoise -colorize 100% ) ^
( -clone 1 -fill red -colorize 100%% ) ^
-reverse -compose over -composite -gravity center -background red -extent 500x500 ^
result.jpg
https://docs.google.com/file/d/0Bz3bfdI ... FWQXc/edit
convert ^
( -background black -fill white -pointsize 100 -font vademecu.ttf label:"test" -edge 2 ) ^
( -clone 0 -fill turquoise -colorize 100%% ) ^
( -clone 1 -fill red -colorize 100%% ) ^
-reverse -compose over -composite -gravity center -background red -extent 500x500 ^
result.jpg
https://docs.google.com/file/d/0Bz3bfdI ... pPblU/edit
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/file/d/0Bz3bfdI ... Fwemc/edit
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any simpler command draw text with outer color like this
Reverse the black and white when creating the text to this in the windows command
convert \
\( -background white -fill black -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" -edge 2 \) \
\( -clone 0 -fill turquoise -colorize 100% \) \
\( -clone 1 -fill red -colorize 100% \) \
-reverse -compose over -composite -gravity center -background red -extent 500x500 \
result.jpg
Also your first post does say vademecum.ttf
convert \
\( -background white -fill black -pointsize 100 -font /Library/Fonts/vademecu.ttf label:"test" -edge 2 \) \
\( -clone 0 -fill turquoise -colorize 100% \) \
\( -clone 1 -fill red -colorize 100% \) \
-reverse -compose over -composite -gravity center -background red -extent 500x500 \
result.jpg
Also your first post does say vademecum.ttf
Re: any simpler command draw text with outer color like this
oh thanks, it is almost the same as I want
- 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
Looks like you are trying to add an outline to some text.. much like the compound font example
http://www.imagemagick.org/Usage/fonts/#outline
Other examples follow the above link that are often easier. Specifically using stroke to outline the font.
http://www.imagemagick.org/Usage/fonts/#outline
Other examples follow the above link that are often easier. Specifically using stroke to outline the font.
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
woo, thx.
I wont use stroke, because it is ugly on Vademecum, and no outline effect. (in line)
and how can I control the text to be center of the image ? seems annotate is starting by the lower left corner
I am now first calculate the total width and height of the text, then /2, and minus the width and plus the height of center to annotate
>convert -size 500x500 xc:red -pointsize 100 -font Vademecum.ttf -pointsize 100 ^
-fill turquoise1 -annotate +248+248 test ^
-annotate +248+252 test ^
-annotate +252+252 test ^
-annotate +252+248 test ^
-annotate +248+250 test ^
-annotate +250+252 test ^
-fill red -annotate +250+250 test ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... XhrMGRFbG8
>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
I wont use stroke, because it is ugly on Vademecum, and no outline effect. (in line)
and how can I control the text to be center of the image ? seems annotate is starting by the lower left corner
I am now first calculate the total width and height of the text, then /2, and minus the width and plus the height of center to annotate
>convert -size 500x500 xc:red -pointsize 100 -font Vademecum.ttf -pointsize 100 ^
-fill turquoise1 -annotate +248+248 test ^
-annotate +248+252 test ^
-annotate +252+252 test ^
-annotate +252+248 test ^
-annotate +248+250 test ^
-annotate +250+252 test ^
-fill red -annotate +250+250 test ^
out.jpg
https://docs.google.com/open?id=0Bz3bfd ... XhrMGRFbG8
>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