On Wed, 4 Mar 2009 22:22:47 +0200
Noel da Costa <[email protected]> wrote:

| Hi,
| 
| I would expect these two commands to yield the same results, but they  
| don't. The latter only create the shadow and not the gradient overlay  
| text.
| 
| 
| /opt/local/bin/convert -gravity center -size 320x100  
| xc:'rgb(100,100,100)' -font Arial-Bold -pointsize 72 -fill black - 
| annotate +5+5 'Anthony' -tile gradient:black-white -annotate +0+0  
| 'Anthony' /tmp/font_shadow.jpg
| 
| printf "Anthony" | /opt/local/bin/convert -gravity Center -size  
| 320x100 xc:'rgb(204,204,204)' -font Arial-Bold -pointsize 72 -fill  
| black -annotate +5+5 @- -tile gradient:black-white -annotate +0+0 @- / 
| tmp/font_shadow.jpg
| 
Of course they would not.  You can NOT read from the same file handle
twice!!!!

For proper shadowing I suggest you annotate the text onto a transparent
image (any color) ONCE ONLY.   You can then use -shadow to generate a
shadow image with an appropriate offset.

  printf "Anthony" | convert -gravity Center -size 320x100 xc:none \
       -font Arial-Bold -pointsize 72 -tile gradient:black-white \
       -annotate +0+0 @- \
       \
       \( -clone 0 -background black -shadow 60x3+5+5 \) \
       \
       \( -clone 0 -alpha off -fill silver -colorize 100% \) \
       \
       -reverse -flatten /tmp/shadow.jpg

First section create a text image on transparency (with a color gradient fill)

second part make a soft shadow of that transparent shape

third generate a solid color background image

and lastly reverse the order of all the images and flatten all together.





  Anthony Thyssen ( System Programmer )    <[email protected]>
 -----------------------------------------------------------------------------
 "Please remain calm... I may be mad, but I am a professional." --Mad Scientist
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to