Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Quantization & Unique (Dominant) Colors

$
0
0
I'm trying to reduce the colors of an image to 8 dominant colors, and I have a picture of a rainbow here:

Image

I've got code like this:
var qSettings = new QuantizeSettings { Colors = 8, DitherMethod = DitherMethod.No, ColorSpace = ImageMagick.ColorSpace.RGB};
imageMagick.Quantize(qSettings);
                
imageMagick.Write("c:\\work\\test.png");
No matter what combination I try (changing the ColorSpace, modifying TreeDepth, etc.), it will always merge at least two of the bars together. usually red and orange or dark blue and violet.

I was using MagickNet 6.8.9.601, but I just switched to 7.0.0.0001 to see if that would help anything. It didn't. Why does Quantize do that? Do you have any advice or suggestions?

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>