pub trait FrameReader {
// Required methods
fn info(&self) -> ImageInfo;
fn next_frame(&mut self) -> Result<DecodedFrame, DecodeError>;
}Expand description
FrameReader is one opened image, yielding complete composited frames in order.
Animation composition — disposal, blending, partial frames — is the reader’s job; every frame it returns is a full picture. Readers are used from one thread and dropped there.
Required Methods§
Sourcefn info(&self) -> ImageInfo
fn info(&self) -> ImageInfo
info is the output size after DecodeOptions::max_size, the frame count and how the
animation repeats. It is fixed at open and every frame must match it.
Sourcefn next_frame(&mut self) -> Result<DecodedFrame, DecodeError>
fn next_frame(&mut self) -> Result<DecodedFrame, DecodeError>
next_frame decodes the next frame, wrapping to the first after the last.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".