blur effect will not work with -shadow option

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
leonardo_999

blur effect will not work with -shadow option

Post by leonardo_999 »

Hello I'm new to IM.

i want to figure out the -shadow option. it work's but not as expected. the shadow which created by IM is a solid and not blur (i hope this is correct english :-)).

here is the command i put into my terminal:

Code: Select all

convert /opt/local/apache2/htdocs/photowebshop/webshops/dummy/upload/DSC_4974.jpg \( +clone  -background navy  -shadow 80x3+5+5 \) +swap -background none   -layers merge  +repage /opt/local/apache2/htdocs/photowebshop/webshops/dummy/upload/DSC_4974s.jpg
i put the result to this link
http://www.photo-charly.at/thomas/DSC_4974s.jpg

i expected an result like the image of the first example in http://www.imagemagick.org/Usage/convolve/ under capter "Generating Shadows".



thanks for help

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

Re: blur effect will not work with -shadow option

Post by fmw42 »

Not sure I can help, but -layers merge requires IM v6.3.6-2. What is your IM version?

convert -list configure

Look for the line: LIB_VERSION_NUMBER 6,4,3,9
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: blur effect will not work with -shadow option

Post by anthony »

The shadow generated is semi-transparent. JPG does not handle transparency.
You need to 'flatten' your image first to a background of a different color before saving to JPEG, or use PNG images instead.
JPEG transparency - NOT
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
leonardo_999

Re: blur effect will not work with -shadow option

Post by leonardo_999 »

thanks for replies,

with PNG files i get the expectet result.
Post Reply