Page 1 of 1

reduce colors to more than 256?

Posted: 2011-03-09T05:41:49-07:00
by motte
hi,

is it possible to reduce the number of colors of an image to more than 256?
what I'd like to do is

Code: Select all

convert input.png +dither -colors <half of the number of colors in the input image> output.png
but it seems to limited to 256 colors only...
is there a way to use numbers higher than that?

thanks a lot in advance.

Re: reduce colors to more than 256?

Posted: 2011-03-09T11:53:54-07:00
by Drarakel
It's of course possible with more than 256 colors.
If you have problems with one special image, then maybe you can upload that one somewhere.. And: Which ImageMagick version are you using?

Some small hints: If your input file is 16bit per channel, and you want to produce a 8bit per channel file, then make sure that "-depth 8" is BEFORE your "+dither colors .." (it's normally better that way). And if you want to save the output without any PNG optimizing (if there's an error in your IM version), then try to add specific PNG output options, e.g. with "PNG32:output.png" (for 4x8bit).

Re: reduce colors to more than 256?

Posted: 2011-03-10T07:54:53-07:00
by motte
I was using version 6.6.6 q8 -- after upgrading to 6.6.8-2 q16 it works!

thanks drarakel