[magick-users] Summary: drop shadow
Andrew Graham
andrewgraham at worldnet.att.net
Sun Aug 4 11:48:21 PDT 2002
Here is a summary of this thread.
Goal
Add a drop shadow to an image, from the command line.
Method
convert -depth 8 -threshold 0 -negate source.png
-bordercolor white -border 20x20 -gaussian 0x3
-shave 15x15 - | composite -gravity northwest
source.png - out.png
Adjustments
- Set the background color with:
-bordercolor <color>
- Set the color of the drop shadow by adding:
-colorize <r>/<g>/<b>
before -negate, where <r>, <g>, and <b> are the
percentages of red, green, and blue of the desired color.
- Adjust the amount of blur with:
-gaussian <radius>x<sigma>
I find values from 0x3 to 0x5 to be useful.
- Empirical method to adjust the drop shadow's offset:
Set the parameters of -border to four times the desired offset in
pixels, and the parameters of -shave to three times the desired offset.
Notes
- The command is one line, wrapped for the mail message.
- The source image is referenced twice in the command line.
- This method fails when the amount of blur is greater than
the offset of the drop shadow.
Andrew Graham
using IM 5.4.7 on WinXP.
More information about the Magick-users
mailing list