Function rofl::animated_gif::quantize_image [] [src]

pub fn quantize_image(image: &DynamicImage) -> (Vec<u8>, Vec<u8>, Option<u8>)

Low-level function that performs color quantization of an image.

Returns (buffer, palette, transparent) where: * buffer is the image where pixels are palette indexes * palette is a contiguous buffer of RGB colors in the palette used * transparent is optional palette index of the transparent color