Xialoin Wu's fast optimal color quantizer, which is one of the most effective color quantization methods, provides excellent results. However, low frequency colors in the original image tend to be excluded during the histogram counting process. In particular, the loss of original color increases when it uses a small number of boxes to quantize the image with a small number of colors (i.e. photo containing small red lips). Thus, to complement these disadvantages, a better color quantization algorithm that is effective even when it uses only a small number of colors by using the fast pairwise nearest neighbor based algorithm.
Given the limited number of colors, a severe type of artifact arises in the quantized image in areas of smooth color gradients, in the form of false edges, are clearly visible. To reduce such artifacts, a subsequent dithering step is typically employed after quantization. Dithering distributes quantization errors into neighboring pixels, helping to hide the false edges.
GDI+ supports different compression algorithms via the Encoder.Compression. But that's not "Quality". Each algorithm will compress the image to a different size; where the compression with the least number of bytes may be considered "best", in terms of quality of compression. But, that's not what Encoder.Quality means. Encoder.Quality deals with the degree of loss with lossy compression; something that doesn't apply to PNG. PNG is not a lossy format; Therefore, Quality doesn't apply. Possibly using 3rd party applications to write PNG files.
Please find the following c# open source to achieve better quality without support for the compression of PNG file using GDI+ as mentioned above.
https://github.com/mcychan/nQuant.cs
