High-quality image quantizing library