#[non_exhaustive]pub enum ImageSequence {
Single,
Animation {
frame_count: Option<u32>,
loop_count: Option<u32>,
random_access: bool,
},
Multi {
image_count: Option<u32>,
random_access: bool,
},
}Expand description
What kind of image sequence the file contains.
Determines which decoder trait is appropriate:
Single→DecodeAnimation→AnimationFrameDecoderMulti→ futureMultiPageDecoder(orDecodefor primary only)
§Key invariant
The variant tells you which decoder trait applies. Code that sees Multi
knows not to use AnimationFrameDecoder. Code that sees Animation knows
MultiPageDecoder is wrong. Single means only Decode is needed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Single
Single image. Decode returns it.
Animation
Temporal animation: frames share a canvas size, have durations, and may use compositing (disposal, blending, reference slots).
Use AnimationFrameDecoder.
Fields
Multi
Multiple independent images in a single container.
Pages may differ in dimensions, pixel format, color space, and
metadata. Decode returns the primary image only. Other images
require a MultiPageDecoder (future) or the codec’s native API.
Examples: multi-page TIFF, HEIF collections, ICO sizes, DICOM slices, GeoTIFF spectral bands.
Implementations§
Source§impl ImageSequence
impl ImageSequence
Sourcepub fn count(&self) -> Option<u32>
pub fn count(&self) -> Option<u32>
Frame/image count if known.
Single→Some(1)Animation→frame_count(may beNone)Multi→image_count(may beNone)
Sourcepub fn random_access(&self) -> bool
pub fn random_access(&self) -> bool
Whether individual frames/images can be accessed without decoding all priors.
Sourcepub fn is_animation(&self) -> bool
pub fn is_animation(&self) -> bool
Whether this is an animation sequence.
Trait Implementations§
Source§impl Clone for ImageSequence
impl Clone for ImageSequence
Source§fn clone(&self) -> ImageSequence
fn clone(&self) -> ImageSequence
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more