Function engiffen::engiffen [] [src]

pub fn engiffen(
    imgs: &[Image],
    fps: usize,
    quantizer: Quantizer
) -> Result<Gif, Error>

Converts a sequence of images into a Gif at a given frame rate. The quantizer parameter selects the algorithm that quantizes the palette into 256-colors.

Examples

let paths = vec!["tests/ball/ball01.bmp", "tests/ball/ball02.bmp", "tests/ball/ball03.bmp"];
let images = load_images(&paths);
let gif = engiffen(&images, 10, Quantizer::NeuQuant(2))?;
assert_eq!(gif.images.len(), 3);

Errors

If any image dimensions differ, this function will return an Error::Mismatch containing tuples of the conflicting image dimensions.