#[non_exhaustive]pub struct GainMapInfo {
pub params: GainMapParams,
pub width: u32,
pub height: u32,
pub channels: u8,
pub bit_depth: 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
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).
bit_depth: u8Bit depth of the gain map image’s samples: 8, 10, or 12.
The gain-map image can be deeper than 8-bit on AVIF/JXL, and carriers that
declare a sample depth (AVIF av1C, the JXL jhgm codestream) need it.
Defaults to 8 — the UltraHDR / JPEG-MPF norm.
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. bit_depth defaults to 8 and the optional
alternate-color fields to None; set them with the builders.
Sourcepub fn with_bit_depth(self, bit_depth: u8) -> Self
pub fn with_bit_depth(self, bit_depth: u8) -> Self
Set the gain map image’s sample bit depth (8, 10, or 12). Defaults to 8.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more