This project has moved and is read-only. For the latest updates, please go here.

Unique Colors

Oct 15, 2013 at 3:02 AM
I'm trying to find a list of unique colors in an image. My real end goal is to take an image that appears to be black graphic and replace it with any other color.

I know I can get it down to two colors with:
image.QuantizeColors = 2;

I think maybe a histogram would give me the colors in the image.

Any ideas?
Oct 15, 2013 at 6:15 AM
Histogram sounds like the best solution. Maybe I could add a method to the MagickImage class to retrieve the histogram. Magick++ has a method that returns a list of colors with a count. I will have to look into this.
Oct 16, 2013 at 2:29 AM
Thanks Dirk - I'm gonna try and find a work around....I'll update this thread if I find something.
Oct 16, 2013 at 6:15 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.