Mikolaj Machowski on  wrote...
| Hello,
| 
| Some time ago I concocted simple script for adding shadow to image:
| 
| #!/bin/bash
| name=$1
| radius=0
| sigma=3.5
| stran=0.80
| width=`identify -format %w $name`
| height=`identify -format %h $name`
| bgwidth=$(($width+15))
| bgheight=$(($height+15))
| swidth=$(($width+7))
| sheight=$(($height+7))
| 
| convert -size ${bgwidth}x${bgheight}+0+0 xc:none \
|       -draw "fill black rectangle 7,7 $swidth,$sheight" \
|       -channel RGBA -blur ${radius}x${sigma} \
|       -channel A -fx "a*$stran" \
|       -draw "fill black line 0,0 0,$(($height+1))" \
|       -draw "fill black line 0,0 $(($width+1)),0" \
|       -draw "fill black line 0,$(($height+2)), $(($width+2)),$(($height+2))" \
|       -draw "fill black line $(($width+2)),0 $(($width+2)),$(($height+2))" \
|       -draw "image Over 1,1 $width,$height $name" final-$name
| 
| 
| I am using IM 6.3, posted it to someone with 6.2.4 and he gets message:
| 
| convert: Non-conforming drawing primitive definition `image'.
| 
Quote the image name and make sure the width and height numbers are
actually numbers, or use 0,0 to just use the image ASIS

  -draw "image Over 0,0 0,0 '$name'"

But you can also use the new -shadow transform, which will also create
shaped shadows for images with transparency.

See IM examples
  http://www.imagemagick.org/Usage/convolve/#shadow


  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
              There are no bugs, only unrecognized features.
 -----------------------------------------------------------------------------
     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