pub struct AvifDecoder;Expand description
Decodes AVIF container bytes to AvifImage.
Implementations§
Source§impl AvifDecoder
impl AvifDecoder
Sourcepub fn decode(data: &[u8]) -> Result<AvifImage, CodecError>
pub fn decode(data: &[u8]) -> Result<AvifImage, CodecError>
Decode a complete AVIF byte stream.
This parses the ISOBMFF container, extracts spatial/colour metadata
from the iprp boxes, and returns the raw AV1 bitstream in the
y_plane field (full decode of AV1 frames is out of scope for this
implementation; the bitstream is available for further processing).
Sourcepub fn probe(data: &[u8]) -> Result<AvifProbeResult, CodecError>
pub fn probe(data: &[u8]) -> Result<AvifProbeResult, CodecError>
Probe a AVIF byte stream for basic metadata without full decoding.
Trait Implementations§
Source§impl Clone for AvifDecoder
impl Clone for AvifDecoder
Source§fn clone(&self) -> AvifDecoder
fn clone(&self) -> AvifDecoder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AvifDecoder
impl Debug for AvifDecoder
Source§impl Default for AvifDecoder
impl Default for AvifDecoder
Source§fn default() -> AvifDecoder
fn default() -> AvifDecoder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AvifDecoder
impl RefUnwindSafe for AvifDecoder
impl Send for AvifDecoder
impl Sync for AvifDecoder
impl Unpin for AvifDecoder
impl UnsafeUnpin for AvifDecoder
impl UnwindSafe for AvifDecoder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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