pub struct ImageMetadata<'a> { /* private fields */ }Expand description
Image metadata (ICC, EXIF, XMP, tone mapping) to embed in the JXL file.
Implementations§
Source§impl<'a> ImageMetadata<'a>
impl<'a> ImageMetadata<'a>
Sourcepub fn with_icc_profile(self, data: &'a [u8]) -> Self
pub fn with_icc_profile(self, data: &'a [u8]) -> Self
Attach an ICC color profile.
Sourcepub fn icc_profile(&self) -> Option<&[u8]>
pub fn icc_profile(&self) -> Option<&[u8]>
Get the ICC color profile, if set.
Sourcepub fn with_intensity_target(self, nits: f32) -> Self
pub fn with_intensity_target(self, nits: f32) -> Self
Set the peak display luminance in nits (cd/m²) for HDR content.
Written to the JXL codestream ToneMapping.intensity_target field.
Default is 255.0 (SDR). Set to e.g. 4000.0 or 10000.0 for HDR.
Sourcepub fn with_min_nits(self, nits: f32) -> Self
pub fn with_min_nits(self, nits: f32) -> Self
Set the minimum display luminance in nits.
Written to the JXL codestream ToneMapping.min_nits field.
Default is 0.0.
Sourcepub fn intensity_target(&self) -> Option<f32>
pub fn intensity_target(&self) -> Option<f32>
Get the intensity target, if set.
Sourcepub fn with_intrinsic_size(self, width: u32, height: u32) -> Self
pub fn with_intrinsic_size(self, width: u32, height: u32) -> Self
Set the intrinsic display size.
When set, the image should be rendered at this (width, height) rather
than the coded dimensions. Written to the JXL codestream intrinsic_size field.
Sourcepub fn intrinsic_size(&self) -> Option<(u32, u32)>
pub fn intrinsic_size(&self) -> Option<(u32, u32)>
Get the intrinsic size, if set.
Trait Implementations§
Source§impl<'a> Clone for ImageMetadata<'a>
impl<'a> Clone for ImageMetadata<'a>
Source§fn clone(&self) -> ImageMetadata<'a>
fn clone(&self) -> ImageMetadata<'a>
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<'a> Debug for ImageMetadata<'a>
impl<'a> Debug for ImageMetadata<'a>
Source§impl<'a> Default for ImageMetadata<'a>
impl<'a> Default for ImageMetadata<'a>
Source§fn default() -> ImageMetadata<'a>
fn default() -> ImageMetadata<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ImageMetadata<'a>
impl<'a> RefUnwindSafe for ImageMetadata<'a>
impl<'a> Send for ImageMetadata<'a>
impl<'a> Sync for ImageMetadata<'a>
impl<'a> Unpin for ImageMetadata<'a>
impl<'a> UnsafeUnpin for ImageMetadata<'a>
impl<'a> UnwindSafe for ImageMetadata<'a>
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