Struct jpegxl_rs::decode::Metadata

source ·
pub struct Metadata {
    pub width: u32,
    pub height: u32,
    pub intensity_target: f32,
    pub min_nits: f32,
    pub orientation: Orientation,
    pub num_color_channels: u32,
    pub has_alpha_channel: bool,
    pub intrinsic_width: u32,
    pub intrinsic_height: u32,
    pub icc_profile: Option<Vec<u8>>,
}
Expand description

Result of decoding

Fields§

§width: u32

Width of the image

§height: u32

Height of the image

§intensity_target: f32

Upper bound on the intensity level present in the image in nits

§min_nits: f32

Lower bound on the intensity level present in the image

§orientation: Orientation

Orientation

§num_color_channels: u32

Number of color channels per pixel without alpha channel, from metadata

§has_alpha_channel: bool

Whether the image has an alpha channel, from metadata

§intrinsic_width: u32

Intrinsic width of the image. Applications are advised to resample the decoded image to the intrinsic dimensions

§intrinsic_height: u32

Intrinsic height of the image. Applications are advised to resample the decoded image to the intrinsic dimensions

§icc_profile: Option<Vec<u8>>

ICC profile

Trait Implementations§

source§

impl Debug for Metadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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

§

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

§

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.