How to save a greyscale RGB picture with alpha channel?

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
jho

How to save a greyscale RGB picture with alpha channel?

Post by jho »

Hi,
i had a strange problem. I had a picture (16bit tiff) which contains several grey colors. I simply want to compress the picture.
I typed the following:

convert grey.tif -compress zip grey_new.tif

The problem is that the new tif is stored as greyscale with alpha but i want it to be RGB or simply the same as the input.
When I convert a colorful picture it uses RGBA as I want.

I tried to use "-type TrueColorMatte" but it stays greyscale without alpha. When I use "-type TrueColor" I get it in the RGB mode but without the alpha channel.

Does anyone have an idea?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to save a greyscale RGB picture with alpha channel?

Post by magick »

We can reproduce the problem you posted and have a patch. The patch will be available in the next point release of ImageMagick. Thanks.
jho

Re: How to save a greyscale RGB picture with alpha channel?

Post by jho »

Wow, what a fast response time! :shock:

I used the current portable version.

Thank you.
jho

Re: How to save a greyscale RGB picture with alpha channel?

Post by jho »

Great, it works now. Good work. Thank you very much. 8)
Post Reply