[−][src]Crate gif_dispose
Implements GIF disposal method for the gif crate.
The gif crate only exposes raw frame data that is not sufficient to render GIFs properly. GIF requires special composing of frames which, as this crate shows, is non-trivial.
ⓘThis example is not tested
let file = File::open("example.gif")?; let mut decoder = Decoder::new(file); // Important: decoder.set(gif::ColorOutput::Indexed); let mut reader = decoder.read_info()?; let mut screen = Screen::new_reader(&reader); while let Some(frame) = reader.read_next_frame()? { screen.blit(&frame)?; screen.pixels // that's the frame now }
Structs
Screen | Combined GIF frames forming a "virtual screen" |
Enums
Error |
Type Definitions
RGB8 | 8-bit RGB |
RGBA8 | 8-bit RGBA, alpha is last. 0 = transparent, 255 = opaque. |