Page 1 of 1

Annotate Image Ontop Of Other Images (with text effects)

Posted: 2015-12-12T14:31:16-07:00
by myspacee
Hello,
reading around some examples, but can't assemble code to obtain this :

Image

i create an image that contains a word with :

Code: Select all

convert -size 400x70 xc:lightblue -font Candice -pointsize 72 -annotate +25+65 "Contestati" -blur 0x5 -fill white -annotate +25+65 "Contestati" 02_my_words.png


then try to annotate, with trasparencies over original image:

Code: Select all

convert 01_original.jpg 02_my_words.png -colorspace sRGB -gravity southwest -geometry +3+3 -define compose:args=40,100 -compose dissolve -composite 99_final.jpg
but result is far from my above example.

Anyone can help me with syntax?

thank you,
m.

Re: Annotate Image Ontop Of Other Images (with text effects)

Posted: 2015-12-12T14:46:06-07:00
by fmw42
Put your text onto a transparent background, not a colored background or just annotate the text onto the image directly where you want it using -annotate.


Unix syntax:

try one of these. note it would have been easier if you had provided separate images. I had to cut out 01_original.png

Code: Select all

convert  01_original.png \
\( -size 400x75 xc:none -font Candice -pointsize 72 \
-fill white -annotate +25+65 "Contestati" -blur 0x5 \
-fill white -annotate +25+65 "Contestati" \) \
-gravity south -geometry +0+25 -compose over -composite 99_final_2.jpg

Code: Select all

convert 01_original.png \
\( -background none -font Candice -pointsize 72 \
-fill white label:"Contestati" -blur 0x5 \) \
\( -background none -font Candice -pointsize 72 \
-fill white label:"Contestati" \) \
\( -clone 1,2 -compose over -composite \) \
-delete 1,2 -gravity south -geometry +0+25 \
-compose over -composite 99_final_3.jpg

Code: Select all

convert  01_original.png \
\( -size 400x75 xc:none -font Candice -pointsize 72 \
-fill white -annotate +25+65 "Contestati" -blur 0x5 \
-fill white -annotate +25+65 "Contestati" \) \
-gravity south -geometry +0+25 \
-define compose:args=40,100 -compose dissolve -composite 99_final_4.jpg
Not sure why you want the dissolve?

Re: Annotate Image Ontop Of Other Images (with text effects)

Posted: 2015-12-12T15:20:31-07:00
by myspacee
thank you for reply,
can you post Windows code? Can't solve/convert syntax on my w2003 server.

thank you for your time,
m.

Re: Annotate Image Ontop Of Other Images (with text effects)

Posted: 2015-12-12T15:42:24-07:00
by fmw42
See http://www.imagemagick.org/Usage/windows/.

Change end of line \ to ^
Remove \ from before \( and \) so that it is just parentheses ( ... )

Example in Windows syntax:

Code: Select all

convert  01_original.png ^
( -size 400x75 xc:none -font Candice -pointsize 72 ^
-fill white -annotate +25+65 "Contestati" -blur 0x5 ^
-fill white -annotate +25+65 "Contestati" ) ^
-gravity south -geometry +0+25 -compose over -composite 99_final_2.jpg

Re: Annotate Image Ontop Of Other Images (with text effects)

Posted: 2015-12-12T16:46:07-07:00
by GeeMack
If you put a black stroke around the first "annotate" before the "blur", the shadow effect will be more pronounced.

Code: Select all

convert 01_original.png ^
   ^( -size 400x100 xc:none -gravity south ^
      -font Candice -pointsize 72 -strokewidth 6 ^
      -fill black -stroke black ^
      -annotate +0+12 "Contestati" -blur 0x4 ^
      -fill white -stroke none ^
      -annotate +0+12 "Contestati" ^) ^
   -composite 99_final.jpg
And if you're running it from a Windows batch file instead of entering it on the command line (or pasting it in), you'll need to escape the parentheses with carets as I've done in the above example.