pub struct AnimFrame<'a> { /* private fields */ }
Implementations§
source§impl<'a> AnimFrame<'a>
impl<'a> AnimFrame<'a>
pub fn new( image: &'a [u8], layout: PixelLayout, width: u32, height: u32, timestamp: i32, config: Option<&'a WebPConfig> ) -> Self
pub fn from_image(image: &'a DynamicImage, timestamp: i32) -> Result<Self, &str>
sourcepub fn from_rgb(
image: &'a [u8],
width: u32,
height: u32,
timestamp: i32
) -> Self
pub fn from_rgb( image: &'a [u8], width: u32, height: u32, timestamp: i32 ) -> Self
Creates a new encoder from the given image data in the RGB pixel layout.
sourcepub fn from_rgba(
image: &'a [u8],
width: u32,
height: u32,
timestamp: i32
) -> Self
pub fn from_rgba( image: &'a [u8], width: u32, height: u32, timestamp: i32 ) -> Self
Creates a new encoder from the given image data in the RGBA pixel layout.
pub fn get_image(&self) -> &[u8] ⓘ
pub fn get_layout(&self) -> PixelLayout
pub fn get_time_ms(&self) -> i32
pub fn width(&self) -> u32
pub fn height(&self) -> u32
Trait Implementations§
source§impl Into<DynamicImage> for &AnimFrame<'_>
impl Into<DynamicImage> for &AnimFrame<'_>
source§fn into(self) -> DynamicImage
fn into(self) -> DynamicImage
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl<'a> Freeze for AnimFrame<'a>
impl<'a> RefUnwindSafe for AnimFrame<'a>
impl<'a> Send for AnimFrame<'a>
impl<'a> Sync for AnimFrame<'a>
impl<'a> Unpin for AnimFrame<'a>
impl<'a> UnwindSafe for AnimFrame<'a>
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