color_quant

Crates.iocolor_quant
lib.rscolor_quant
version1.1.0
sourcesrc
created_at2015-05-29 12:14:41.495169
updated_at2020-10-09 19:17:17.742242
descriptionColor quantization library to reduce n colors to 256 colors.
homepage
repositoryhttps://github.com/image-rs/color_quant.git
max_upload_size
id2251
size21,282
Andreas Molzer (HeroicKatora)

documentation

README

Color quantization library

This library provides a color quantizer based on the NEUQUANT quantization algorithm by Anthony Dekker.

Usage

let data = vec![0; 40];
let nq = color_quant::NeuQuant::new(10, 256, &data);
let indixes: Vec<u8> = data.chunks(4).map(|pix| nq.index_of(pix) as u8).collect();
let color_map = nq.color_map_rgba();
Commit count: 33

cargo fmt