pub struct DualLayerHdrView<'a> { /* private fields */ }Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Borrowed validated ISO 21496-1 / UltraHDR dual-layer HDR view (zero copy).
The gain_map layer may have any positive dimensions independent of base (full-resolution,
1/2, 1/4, or arbitrary aspect ratio); resampling happens during reconstruction.
Implementations§
Source§impl<'a> DualLayerHdrView<'a>
impl<'a> DualLayerHdrView<'a>
Sourcepub fn new(
base: PixelView<'a>,
gain_map: PixelView<'a>,
metadata: GainMapMetadata,
alternate_color_space: Option<&'a ColorSpace>,
orientation: Orientation,
) -> Result<DualLayerHdrView<'a>, At<BufferError>>
pub fn new( base: PixelView<'a>, gain_map: PixelView<'a>, metadata: GainMapMetadata, alternate_color_space: Option<&'a ColorSpace>, orientation: Orientation, ) -> Result<DualLayerHdrView<'a>, At<BufferError>>
Construct a validated borrowed dual-layer HDR view.
Rejects misregistered layer orientations (base.orientation() != gain_map.orientation())
or a non-Identity layer orientation that contradicts orientation.
Sourcepub const fn gain_map(&self) -> &PixelView<'a>
pub const fn gain_map(&self) -> &PixelView<'a>
Borrowed numeric gain-map view (ColorSpace::Untagged, 1 or 3 channels).
Sourcepub const fn metadata(&self) -> GainMapMetadata
pub const fn metadata(&self) -> GainMapMetadata
Exact rational ISO 21496-1 reconstruction metadata.
Sourcepub const fn alternate_color_space(&self) -> Option<&'a ColorSpace>
pub const fn alternate_color_space(&self) -> Option<&'a ColorSpace>
Alternate rendition color space, if declared (required when application_space == Alternate).
Sourcepub const fn orientation(&self) -> Orientation
pub const fn orientation(&self) -> Orientation
Shared pending EXIF orientation for the aligned (base, gain_map) pair.
Sourcepub const fn with_orientation(
self,
orientation: Orientation,
) -> DualLayerHdrView<'a>
pub const fn with_orientation( self, orientation: Orientation, ) -> DualLayerHdrView<'a>
Replace the shared pending EXIF orientation on this borrowed view.
Sourcepub const fn compose_orientation(
self,
delta: Orientation,
) -> DualLayerHdrView<'a>
pub const fn compose_orientation( self, delta: Orientation, ) -> DualLayerHdrView<'a>
Compose an additional display transform (including reflections) onto the shared pending
EXIF orientation (self.orientation.then(delta)) in O(1) without touching or copying
either pixel layer.
Sourcepub const fn display_dimensions(&self) -> (u32, u32)
pub const fn display_dimensions(&self) -> (u32, u32)
Display-oriented (width, height) of the base image after applying self.orientation().
Trait Implementations§
Source§impl<'a> Clone for DualLayerHdrView<'a>
impl<'a> Clone for DualLayerHdrView<'a>
Source§fn clone(&self) -> DualLayerHdrView<'a>
fn clone(&self) -> DualLayerHdrView<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more