Problem with shadow command

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
paolo

Problem with shadow command

Post by paolo »

Hi,

I'm trying to use the basic shadow command found here: http://www.imagemagick.org/Usage/convolve/#shadow

After searching in older posts, I just added to that command "-matte" because I had a jpg

convert spiderman3.jpg -matte ^( +clone -background red -shadow 80x3+5+5 ^) +swap -background none -mosaic shadow1.png

but the result is only a thick border shifted by 5 and not blurry at all. I used red here to make it clear, I'd like to use gray or something (my background will be black, so it must be a light color).

This is the random image I'm playing with. I'd like to use this shadow command independently from the picture
Image

Thanks for your help!
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Problem with shadow command

Post by Bonzo »

The code below worked for me:

Code: Select all

<?php 
exec("convert boots_layer_2.png -background black -shadow 80x3+5+5 final.png "); 
exec("convert final.png boots_layer_2.png -composite shadow_test.png"); 
?> 
Image
Post Reply