Re: How preserve existing alpha with -separate?

Fred Weinhaus <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <p06240803c761ceb26508@[192.168.1.2]>
>My input is a 32bpp TGA saved from Photoshop CS3, and I need IM to
>invert the blue channel, then swap the blue and green channels, then
>output a 32bpp TGA again.
>
>It all works fine, except I can't get IM to preserve the pre-existing
>alpha channel data, instead it fills the alpha channel with white.
>
>convert in.tga -type TrueColorMatte -channel blue -negate +channel
>-separate -channel all -swap 1,2 -combine out.tga


try

convert in.tga -channel rgba -alpha on -separate \
\( -clone 2 -negate \) -swap 2,4 -delete 4 -swap 1,2 -combine out.tga


(seemed to work for me on the logo image where white was made 
transparent and saved to png)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.