pub struct AnimationInfo {
pub canvas_width: u32,
pub canvas_height: u32,
pub loop_count: u32,
pub background_color: u32,
pub frame_count: u32,
}Expand description
The parameters of an animation (C: WebPAnimInfo).
§Examples
use webp::api::decode::{AnimationDecoder, AnimationOptions};
// A still image is an animation of one frame.
let info = AnimationDecoder::new(&file, AnimationOptions::default())?.info();
assert_eq!((info.canvas_width, info.canvas_height, info.frame_count), (3, 2, 1));Fields§
§canvas_width: u32The canvas width in pixels.
canvas_height: u32The canvas height in pixels.
loop_count: u32The number of times the animation loops, 0 for forever (1 for a still image).
background_color: u32The background color as 0xAARRGGBB (the ANIM chunk’s bytes read as
a little-endian u32), reported and not applied; see
Container::background_color.
frame_count: u32The number of frames.
Trait Implementations§
Source§impl Clone for AnimationInfo
impl Clone for AnimationInfo
impl Copy for AnimationInfo
Source§impl Debug for AnimationInfo
impl Debug for AnimationInfo
impl Eq for AnimationInfo
Source§impl Hash for AnimationInfo
impl Hash for AnimationInfo
Source§impl PartialEq for AnimationInfo
impl PartialEq for AnimationInfo
impl StructuralPartialEq for AnimationInfo
Auto Trait Implementations§
impl Forget for AnimationInfo
impl Freeze for AnimationInfo
impl Move for AnimationInfo
impl RefUnwindSafe for AnimationInfo
impl Send for AnimationInfo
impl Sync for AnimationInfo
impl Unpin for AnimationInfo
impl UnsafeUnpin for AnimationInfo
impl UnwindSafe for AnimationInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more