Skip to main content

JxlImage

Struct JxlImage 

Source
#[non_exhaustive]
pub struct JxlImage { pub width: usize, pub height: usize, pub data: Vec<u8>, pub channels: usize, pub is_grayscale: bool, pub info: JxlBasicInfo, pub output_profile: JxlColorProfile, pub embedded_profile: JxlColorProfile, pub gain_map: Option<GainMapBundle>, pub exif: Option<Vec<u8>>, pub xmp: Option<Vec<u8>>, }
Expand description

A decoded JXL image with interleaved RGBA (or GrayAlpha) u8 pixel data.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§width: usize

Image width in pixels.

§height: usize

Image height in pixels.

§data: Vec<u8>

Interleaved pixel data: RGBA or GrayAlpha, row-major, tightly packed. Length = width * height * channels where channels is 4 (RGBA) or 2 (GrayAlpha).

§channels: usize

Number of channels per pixel (4 for RGBA, 2 for GrayAlpha).

§is_grayscale: bool

True if the source image is grayscale (output is GrayAlpha).

§info: JxlBasicInfo

Image metadata from the file header.

§output_profile: JxlColorProfile

The color profile of the output pixels.

§embedded_profile: JxlColorProfile

The color profile embedded in the file.

§gain_map: Option<GainMapBundle>

HDR gain map bundle from a jhgm container box, if present.

§exif: Option<Vec<u8>>

Raw EXIF data from the Exif container box (TIFF header offset stripped). None for bare codestreams or files without an Exif box.

§xmp: Option<Vec<u8>>

Raw XMP data from the xml container box. None for bare codestreams or files without an xml box.

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.