Re: 4 channel image looks like greyscale

Fred Weinhaus <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <p06240800c808f0a94272@[192.168.1.2]>
I am not an expert on this, but I am not sure that IM treats the 
alpha channel the same as the others. So if you have a 4 channel 
multispectral image, telling it that it is rgba may not work (and I 
don't think prefacing it with rgba: is meaningful in IM, but I could 
be wrong).  Also I don't think jp2 (like jpg) may not support alpha, 
so try converting to png that does support alpha channels

try to separate all the channels and then possibly put the 4th 
channel back as a an alpha channel, if they separate and look good

try the following:

convert test.jp2 -channel rgba -matte test.png

does that work, if not then try separating channels (see 
http://www.imagemagick.org/Usage/channels/#channels

convert test.jp2 -separate test_%d.png

then combine any 3 together to view as RGB.


You might be able to trick IM into thinking the 4 channels are CMYK.

convert test.jp2 -set colorspace CMYK test.jpg

but then I am not sure what to do after that or what the result might 
be. But you could then convert to RGB, but then you will have changed 
from 4 channels to 3 and colorspaces as well.

Fred
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.