| Crates.io | giffy |
| lib.rs | giffy |
| version | 0.2.0 |
| created_at | 2019-06-08 21:11:21.696659+00 |
| updated_at | 2019-06-11 04:53:54.931949+00 |
| description | A simple GIF decoder written in Rust. |
| homepage | |
| repository | https://github.com/darshanparajuli/giffy |
| max_upload_size | |
| id | 139869 |
| size | 51,495 |
A simple GIF decoder written in Rust.
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 the frame
}
}
Err(e) => {
eprintln!("Error: {}", e);
}
}
cargo run --example example <GIF file path> <output folder path>
This example splits the <GIF file path> into individual images and save it in the <output folder path>.
At this time, this decoder is meant to be for educational/learning purposes only.