pub struct WebpAnimDecoder;Expand description
Decoder for animated WebP files.
Implementations§
Source§impl WebpAnimDecoder
impl WebpAnimDecoder
Sourcepub fn decode(data: &[u8]) -> CodecResult<(Vec<WebpAnimFrame>, WebpAnimConfig)>
pub fn decode(data: &[u8]) -> CodecResult<(Vec<WebpAnimFrame>, WebpAnimConfig)>
Decode an animated WebP byte stream into frames and configuration.
Returns the decoded frames (with RGBA pixel data) and animation config.
Sourcepub fn frame_count(data: &[u8]) -> CodecResult<u32>
pub fn frame_count(data: &[u8]) -> CodecResult<u32>
Return the number of animation frames without fully decoding all pixel data.
Sourcepub fn is_webp_anim(data: &[u8]) -> bool
pub fn is_webp_anim(data: &[u8]) -> bool
Return true if the byte slice is a valid animated WebP (RIFF+WEBP with ANIM chunk).
Auto Trait Implementations§
impl Freeze for WebpAnimDecoder
impl RefUnwindSafe for WebpAnimDecoder
impl Send for WebpAnimDecoder
impl Sync for WebpAnimDecoder
impl Unpin for WebpAnimDecoder
impl UnsafeUnpin for WebpAnimDecoder
impl UnwindSafe for WebpAnimDecoder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more