grayscale and alpha..

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
goruka

grayscale and alpha..

Post by goruka »

Is there a way using imagemagick to take a grayscale image, and generate another one, where the image is white and has the original grayscale image as alpha channel?
Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: grayscale and alpha..

Post by fmw42 »

convert image \( -clone 0 -threshold -1 \) +swap -alpha off -compose copy_opacity -composite resultimage
goruka

Re: grayscale and alpha..

Post by goruka »

fmw42 wrote:convert image \( -clone 0 -threshold -1 \) +swap -alpha off -compose copy_opacity -composite resultimage
Thanks enormously!
Post Reply