Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Decoder
✓ use gif::Decoder;
Decodes a GIF file and reads its first frame.
use gif::Decoder;
use std::fs::File;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let file = File::open("example.gif")?;
let mut decoder = Decoder::new(file)?;
let frame = decoder.read_next_frame()?.unwrap();
println!("Frame dimensions: {}x{}", frame.width, frame.height);
Ok(())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.14.2latest on crates.io
Audit
Dependencies
No dependency data recorded yet.