Page 1 of 1

Is there an easy way to alter the color mode of an output PNG _withou

Posted: 2015-09-09T07:44:47-07:00
by GaiusCoffey
Hi,
This is probably a newbie question, sorry.

I have a GIF with a transparent background. I want to get a transparent PNG that I can use in InDesign - InDesign doesn't like Color Mode "index", but it is fine with Color Mode "rgb". (Color mode is Photoshop term, I don't know the equivalent in ImageMagick.)

When I convert to PNG, it generates a PNG that Photoshop reports as Color Mode "Index".

When I convert to PNG in the exact same way but resize to any value other than 100%, the PNG is generated with Color Mode "RGB" (which is what I want).

So far, I have not been able to have any effect on the output colour mode _unless_ I resize the PNG. I have tried so far setting colorspace, channel, transparency etc.

So...

Is there an easy way to alter the color mode of an output PNG _without_ resizing?
Thanks,
G

Re: Is there an easy way to alter the color mode of an output PNG _withou

Posted: 2015-09-09T08:45:10-07:00
by snibgo
Try "-type TrueColorAlpha".

If that doesn't work, try prefixing the output filename with "PNG32:".

Re: Is there an easy way to alter the color mode of an output PNG _withou

Posted: 2015-09-09T08:49:44-07:00
by GaiusCoffey
Thanks, the first one didn't work, but the second one worked like a charm.
Much appreciated,
G

Re: Is there an easy way to alter the color mode of an output PNG _withou

Posted: 2015-09-09T09:21:39-07:00
by snibgo
Good.

The "32" means 4 channels (RGBA) each of 8 bits. Use "24" if you don't have alpha, "64" if you want 16 bits per channel, etc.