Page 1 of 1

color quantization/dithering question

Posted: 2010-07-20T14:59:14-07:00
by marshmallow
Hi,

I have a question on the best way to reduce the number of colors in an image for a textile project that I am working on. I have an RGB image that I would like to reduce down to 40 or so colors, where the chosen colors come from a palette of about 450 thread colors. I have rgb color values for each thread color. Is there a way to do this with IM? I've read the examples and it's not clear to me whether the map function works with an image that contains more than 256 colors.

Thanks,

Marshmallow

Re: color quantization/dithering question

Posted: 2010-07-20T15:46:34-07:00
by fmw42
-map (or -remap), I believe, will work on more colors than 256. Your colormap will decide how many colors you get in the end. You can then try to reduce the colors after the -map by using +dither -colors 40, but there is no guarantee that the colors will remain in your palette or that you will get 40 exactly, as I understand it. You may be best to reduce your colortable to 40 first and then skip the -colors 40 step.

Re: color quantization/dithering question

Posted: 2010-07-20T15:48:46-07:00
by marclallen
Because I've simplified the problem to show the -set delay not working.

In reality, I had a \( -clone 0 \) before the stack with the -set delay 10. This cloned image was not deleted and had the full 5 seconds.

Marc

Re: color quantization/dithering question

Posted: 2010-07-20T15:55:42-07:00
by fmw42
marclallen wrote:Because I've simplified the problem to show the -set delay not working.

In reality, I had a \( -clone 0 \) before the stack with the -set delay 10. This cloned image was not deleted and had the full 5 seconds.

Marc

The above is a reply to the wrong topic. But I understand. Perhaps you need to provide your proper command that worked before and an example or change your example to something that will demonstrate your real problem.

Re: color quantization/dithering question

Posted: 2010-07-20T16:29:24-07:00
by marclallen
How the heck did that happen? I'm so sorry.

Re: color quantization/dithering question

Posted: 2010-07-20T18:31:46-07:00
by fmw42
marclallen wrote:How the heck did that happen? I'm so sorry.

No problem, as I was attending to both issue. So I knew what happened.