Page 1 of 1

Drop shadow or fade function in Magick++

Posted: 2015-08-03T19:43:33-07:00
by lavenderx311
I'm writing in C++ for ImageMagick 6.9.1-10 and am desperately needing a drop shadow function for my images. Magick++ only has a shadow function (which only makes the entire image a shadow of itself). Right now, I've copied my image, placed it behind my original, and added the shadow function to it. However it still seems very harsh. Does anyone have help with this? Perhaps an effect that would blend my self-made shadow with the background? Thanks.

This is the image: http://postimg.org/image/tolu48ujb/
I want it to look something like this: http://postimg.org/image/y6x8icwv7/

Re: Drop shadow or fade function in Magick++

Posted: 2015-08-03T20:06:44-07:00
by fmw42
Try this (unix syntax)

Code: Select all

convert 162.png  \
\( -clone 0 -background black -shadow 80x3+5+5 \) \
+swap -background none -layers merge +repage result.png

(you did not tell us your platform)

same command as at http://www.imagemagick.org/Usage/blur/#shadow, but you have transparency in the image, so it will get a shadow.

The result image will be bigger than the input due to the added external shadow. So you may want to crop the image to its original size.

Re: Drop shadow or fade function in Magick++

Posted: 2015-08-03T20:11:24-07:00
by fmw42
lavenderx311 wrote:Sorry wrong photo.
Before: http://postimg.org/image/ki4bqyidr/
After: http://postimg.org/image/y6x8icwv7/

I am using Magick++ on Xcode, so i can't use the given code.
Then you will need to ask on the Magick++ forum about the same command. I have moved some of the posts in Users to your post here and delete your whole post on Users.