#[non_exhaustive]pub struct GainMapInfo {
pub params: GainMapParams,
pub width: u32,
pub height: u32,
pub channels: u8,
pub alternate_cicp: Option<Cicp>,
pub alternate_icc: Option<Arc<[u8]>>,
}Expand description
Complete gain map description: parameters + image properties + alternate color.
Returned from probing when a gain map is detected. Contains enough information to describe the gain map without carrying 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.params: GainMapParamsISO 21496-1 gain map parameters.
width: u32Gain map image width in pixels.
height: u32Gain map image height in pixels.
channels: u8Number of gain map channels: 1 (luminance) or 3 (per-channel RGB).
alternate_cicp: Option<Cicp>CICP color description of the alternate (typically HDR) rendition.
alternate_icc: Option<Arc<[u8]>>ICC profile of the alternate rendition.
Implementations§
Source§impl GainMapInfo
impl GainMapInfo
Sourcepub fn new(params: GainMapParams, width: u32, height: u32, channels: u8) -> Self
pub fn new(params: GainMapParams, width: u32, height: u32, channels: u8) -> Self
Create with required fields. Optional fields default to None.
Sourcepub fn with_alternate_cicp(self, cicp: Cicp) -> Self
pub fn with_alternate_cicp(self, cicp: Cicp) -> Self
Set the alternate rendition’s CICP color description.
Sourcepub fn with_alternate_icc(self, icc: impl Into<Arc<[u8]>>) -> Self
pub fn with_alternate_icc(self, icc: impl Into<Arc<[u8]>>) -> Self
Set the alternate rendition’s ICC profile.
Trait Implementations§
Source§impl Clone for GainMapInfo
impl Clone for GainMapInfo
Source§fn clone(&self) -> GainMapInfo
fn clone(&self) -> GainMapInfo
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 GainMapInfo
impl Debug for GainMapInfo
Source§impl PartialEq for GainMapInfo
impl PartialEq for GainMapInfo
impl StructuralPartialEq for GainMapInfo
Auto Trait Implementations§
impl Freeze for GainMapInfo
impl RefUnwindSafe for GainMapInfo
impl Send for GainMapInfo
impl Sync for GainMapInfo
impl Unpin for GainMapInfo
impl UnsafeUnpin for GainMapInfo
impl UnwindSafe for GainMapInfo
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