Bottom Edge Fade to Transparent

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
stevelaw

Bottom Edge Fade to Transparent

Post by stevelaw »

Hi,

I need to fade out the bottom edge of an image by increasing the transparency as it's approaching the edge. How would I go about doing this?

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

Re: Bottom Edge Fade to Transparent

Post by fmw42 »

dim=`convert image -format "%wx%h" info:`
convert image -size $dim gradient: -compose copy_opacity -composite result

You have to create a gradient image for the transparency and insert it into the alpha channel of the image.

see http://www.imagemagick.org/Usage/compose/#copyopacity
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Bottom Edge Fade to Transparent

Post by anthony »

See IM Exmaples, Overlapping photos
http://www.imagemagick.org/Usage/photos/#overlap

Fixed the above link! _sorry 'bout that chief, missed it by that much!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
jpiquemal
Posts: 54
Joined: 2003-12-07T01:57:19-07:00

Re: Bottom Edge Fade to Transparent

Post by jpiquemal »

Post Reply