reduce colors to more than 256?

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
motte
Posts: 2
Joined: 2011-03-09T05:15:06-07:00
Authentication code: 8675308

reduce colors to more than 256?

Post 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.
Drarakel
Posts: 547
Joined: 2010-04-07T12:36:59-07:00
Authentication code: 8675308

Re: reduce colors to more than 256?

Post 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).
motte
Posts: 2
Joined: 2011-03-09T05:15:06-07:00
Authentication code: 8675308

Re: reduce colors to more than 256?

Post by motte »

I was using version 6.6.6 q8 -- after upgrading to 6.6.8-2 q16 it works!

thanks drarakel
Post Reply