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
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§
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