Demonstrates how to reduce 24-bit colors to 8-bit using NeuQuant algorithm and save the result to PNG. Comparing to classic color quantization algorithms, NeuQuant provides much better quality and preserves alpha channel, scarifying the performance.

To run this sample in Visual Studio, install the Graphics Mill trial and open the Aurigma.GraphicsMill.sln solution in the Samples folder. Find the sample in this project:

A. Load and Save → A.15. PNG NeuQuant

indexed+4loading+15neuquantpalette+3png+1saving+10web optimization+5

Code snippet

View on GitHub

Loading from GitHub..