.cargo/vendor/color_quant/README.md
raw| 1 | # Color quantization library |
| 2 | This library provides a color quantizer based on the [NEUQUANT](https://scientificgems.wordpress.com/stuff/neuquant-fast-high-quality-image-quantization/) |
| 3 | quantization algorithm by Anthony Dekker. |
| 4 | |
| 5 | ### Usage |
| 6 | |
| 7 | let data = vec![0; 40]; |
| 8 | let nq = color_quant::NeuQuant::new(10, 256, &data); |
| 9 | let indixes: Vec<u8> = data.chunks(4).map(|pix| nq.index_of(pix) as u8).collect(); |
| 10 | let color_map = nq.color_map_rgba(); |
| 11 |