Page 1 of 1

New comer: Quantization question

Posted: 2009-07-21T06:38:55-07:00
by ian313665
Hi,

I've recently found ImageMagick and I'm reading up on how to use it. So far I'm very impressed with it's versatility as a tool and I'm shocked I haven't heard of it before!

My main area of interest is image quantization.

I want to reduce the colors of an image and then save the image in a full color format. For instance, if I reduce the colors of an image to 16 and load it in a paint program, I can see that it has a palette assigned. What I would like to do is save the image in full RGB.

The command I am currently using is:

Code: Select all

convert myImage.png +dither -colors 16 myNewImage.png
How can I alter my steps to save the output PNG in a full color RGB format?

Thanks in advance.

Re: New comer: Quantization question

Posted: 2009-07-21T06:45:12-07:00
by ian313665
Oh I also forgot to mention that my image must preserve the alpha correctly.

What really impresses me about ImageMagick is that the quantization process considers the alpha channel of an image. This is my main reason for using this tool as I haven't found anything else out there to do this.

I'm not sure if that will affect anything but I just thought I'd mention it, just in case.

Re: New comer: Quantization question

Posted: 2009-07-21T15:13:40-07:00
by fmw42
ian313665 wrote:Hi,

I've recently found ImageMagick and I'm reading up on how to use it. So far I'm very impressed with it's versatility as a tool and I'm shocked I haven't heard of it before!

My main area of interest is image quantization.

I want to reduce the colors of an image and then save the image in a full color format. For instance, if I reduce the colors of an image to 16 and load it in a paint program, I can see that it has a palette assigned. What I would like to do is save the image in full RGB.

The command I am currently using is:

Code: Select all

convert myImage.png +dither -colors 16 myNewImage.png
How can I alter my steps to save the output PNG in a full color RGB format?

Thanks in advance.
try

PNG32:myNewImage.png

see http://www.imagemagick.org/Usage/formats/#png_formats