Struct StreamingDecoder
pub struct StreamingDecoder { /* private fields */ }
GIF decoder which emits low-level events for items in the GIF file
To just get GIF frames, use crate::Decoder instead.
Implementations
impl StreamingDecoder
fn new() -> SelfCreates a new streaming decoder
fn update(&mut self, buf: &[u8], write_into: &mut OutputBuffer<'_>) -> Result<(usize, Decoded), DecodingError>Updates the internal state of the decoder.
Returns the number of bytes consumed from the input buffer and the last decoding result.
fn last_ext_sub_block(&mut self) -> &[u8]Data of the last extension sub block that has been decoded. You need to concatenate all subblocks together to get the overall block content.
fn current_frame_mut(&mut self) -> &mut Frame<'static>Current frame info as a mutable ref.
fn current_frame(&self) -> &Frame<'static>Current frame info as a ref.
fn width(&self) -> u16Width of the image
fn height(&self) -> u16Height of the image
fn version(&self) -> VersionThe version number of the GIF standard used in this image.
We suppose a minimum of
V87acompatibility. This value will be reported until we have read the version information in the magic header bytes.