Page 1 of 1

fading greyscale image proportionally

Posted: 2011-04-19T19:29:18-07:00
by panta
Hi there!

I've a grayscale image that would like to turn into transparent, as follows:
White --> fully transparent
Black --> fully opaque
and everything in the middle should be proportionally turned into transparent.

I tried replacing white with transparent (even using -fuzz) but it doesn't achieve what I want.

Ideas?

thanks!

Re: fading greyscale image proportionally

Posted: 2011-04-19T20:28:32-07:00
by panta
Ah, never mind, I found a seimilar:

viewtopic.php?f=1&t=17526&hilit=transparent

Re: fading greyscale image proportionally

Posted: 2011-04-20T16:48:04-07:00
by anthony
convert mask_image -negate -background black -alpha shape shape_image

See Masks as Colored Shapes
http://www.imagemagick.org/Usage/masking/#shapes

The use of -alpha shape was added AFTER that specific discusion.