Skip to main content

WebpHeader

Struct WebpHeader 

Source
pub struct WebpHeader {
Show 18 fields pub width: usize, pub height: usize, pub canvas_width: usize, pub canvas_height: usize, pub image_chunksize: usize, pub has_icc_profile: bool, pub has_alpha: bool, pub has_exif: bool, pub has_xmp: bool, pub has_animation: bool, pub lossy: bool, pub image: Vec<u8>, pub icc_profile: Option<Vec<u8>>, pub alpha: Option<Vec<u8>>, pub exif: Option<Vec<u8>>, pub xmp: Option<Vec<u8>>, pub animation: Option<AnimationControl>, pub animation_frame: Option<Vec<AnimationFrame>>,
}
Expand description

Container-level metadata returned by read_header.

Fields§

§width: usize

Image width for still images.

§height: usize

Image height for still images.

§canvas_width: usize

Canvas width from VP8X, when present.

§canvas_height: usize

Canvas height from VP8X, when present.

§image_chunksize: usize

Encoded size of the primary image chunk.

§has_icc_profile: bool

Whether an ICC profile is advertised.

§has_alpha: bool

Whether alpha is advertised or present.

§has_exif: bool

Whether EXIF metadata is advertised.

§has_xmp: bool

Whether XMP metadata is advertised.

§has_animation: bool

Whether animation is advertised.

§lossy: bool

true for VP8 , false for VP8L.

§image: Vec<u8>

Raw primary image payload.

§icc_profile: Option<Vec<u8>>

Optional ICC profile payload.

§alpha: Option<Vec<u8>>

Optional still-image ALPH payload.

§exif: Option<Vec<u8>>

Optional EXIF payload.

§xmp: Option<Vec<u8>>

Optional XMP payload.

§animation: Option<AnimationControl>

Optional animation control block.

§animation_frame: Option<Vec<AnimationFrame>>

Optional parsed animation frame entries.

Implementations§

Source§

impl WebpHeader

Source

pub fn new() -> Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.