Advanced drop shadow effect

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mazelx

Advanced drop shadow effect

Post by mazelx »

Hi there,

I've been struggling to find a solution to make a drop shadow just like this : http://www.flickr.com/photos/s0ulsurfing/4800804307/ with ImageMagick.

Basicly the effect is a combination of 2 drop shadows, bottom right and top left, with different intensity.

I'm ok making a single drop shadow (with a tiny border) : convert <input.jpg> -bordercolor "#4F4F4F" -border 1x1 \( +clone -background gray -shadow 60x10+10+10 \) +swap -background white -layers merge +repage <output.jpg>, but how can I achieve to get such result ??

Many thanks ;)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Advanced drop shadow effect

Post by fmw42 »

try this and then adjust the parameters:


convert <image.jpg> \
\( -clone 0 -background gray -shadow 80x3+10+10 \) \
\( -clone 0 -background gray -shadow 80x3-5-5 \) \
-reverse -background none -layers merge +repage shadow.png


see http://www.imagemagick.org/script/comma ... php#shadow and http://www.imagemagick.org/Usage/blur/#shadow
mazelx

Re: Advanced drop shadow effect

Post by mazelx »

Brilliant! That's great

I tried a command very similar before, but I could'nt get it work like the way I wanted....


thanks a lot!
Post Reply