[][src]Crate giffy

giffy is a simple GIF decoder.

Example

use giffy;
use std::fs::File;

let mut src = File::open("<gif path>").expect("File not found");
match giffy::load(&mut src) {
    Ok(gif) => {
        for frame in gif.image_frames {
            // do something with frames
        }
    }

    Err(e) => {
        eprintln!("Error: {}", e);
    }
}

Structs

Color

Color stores Red, Green, Blue values in that order.

Gif

This struct holds the width, height and the image frames of the GIF media.

ImageFrame

This struct holds the color values of the image frame.

Functions

load

Attempt to load a GIF from a given src.