Color quantization problems
Posted: Tue Mar 30, 2010 4:15 am
This is half bug report/half enhancement request. From an old thread:
1. For simple quantize, I would say anything below 128 should be quantized down and anything above should be quantized up. eg, 8-level quantization is 0, 32, 64, 96, 159, 191, 223, 255
2. Dither should mean something more useful, like a median-cut algorithm.
3. A new Perceptual mode with K-means or the algorithm described in this paper.
4. Pattern dithering also needs to be fixed: Greyscale images turn all kinds of funky colors when you use it.
5. Floyd/Steinburg works great, though.
Irfanview, surprisingly, also still has the same problem years after I first reported it.
[edit: changed the link to median cut to the C++ implementation.]
Five years later, this problem remains. Photoshop/Imageready has had excellent adaptive color quantization for over a decade now, but XnView's still can't keep white backgrounds white. Because of this I keep having to use photoshop to export my pngs even though I do all basic edits in xnview now. Any chance for this to be looked at again and a smarter algorithm used?xnview wrote:Yes, right. There is a problem because when i quantize picture, i reduce bits per component, so after white is no more whiteBingo wrote:Yes, but the output is... dithered !xnview wrote:But with the -dither, all is ok, no?
I do not want dithering in the output images, I need plain colors.
You can try with other software, you'll have same result.
But do you have same result with ImageMagick?
1. For simple quantize, I would say anything below 128 should be quantized down and anything above should be quantized up. eg, 8-level quantization is 0, 32, 64, 96, 159, 191, 223, 255
2. Dither should mean something more useful, like a median-cut algorithm.
3. A new Perceptual mode with K-means or the algorithm described in this paper.
4. Pattern dithering also needs to be fixed: Greyscale images turn all kinds of funky colors when you use it.
5. Floyd/Steinburg works great, though.
Irfanview, surprisingly, also still has the same problem years after I first reported it.
[edit: changed the link to median cut to the C++ implementation.]