#quantization #palette #k-means #color #dither

quantette

A fast and high quality image quantizer and palette generator. Supports the CIELAB, Oklab, and sRGB color spaces.

3 unstable releases

0.2.0 Mar 21, 2024
0.1.1 Oct 28, 2023
0.1.0 Oct 25, 2023

#378 in Images

Download history 9/week @ 2024-02-03 6/week @ 2024-02-17 71/week @ 2024-02-24 7/week @ 2024-03-02 9/week @ 2024-03-09 175/week @ 2024-03-16 34/week @ 2024-03-23 29/week @ 2024-03-30 3/week @ 2024-04-06

136 downloads per month
Used in okolors

MIT/Apache

235KB
4.5K SLoC

quantette

Crate Docs

quantette is a library for fast and high quality image quantization and palette generation. It supports the sRGB color space for fast color quantization but also the CIELAB and Oklab color spaces for more accurate quantization. Similarly, quantette's k-means color quantizer gives high quality results while the included Wu color quantizer gives fast but still quite good results.

In some critical locations, quantette makes use of SIMD (via the wide crate). Consider enabling the avx or avx2 target features for a noticeable speed up if your target architecture supports these features. If the threads cargo feature is enabled, multi-threaded versions of most functions become available for even greater speed up.

See Examples for example output images from quantette and see Benchmarks and Accuracy for comparisons with other libraries.

License

quantette is licensed under either

at your option.

Dependencies

~14MB
~123K SLoC