Skip to main content

DualLayerHdrView

Struct DualLayerHdrView 

Source
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>

Source

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.

Source

pub const fn base(&self) -> &PixelView<'a>

Borrowed base rendition view.

Source

pub const fn gain_map(&self) -> &PixelView<'a>

Borrowed numeric gain-map view (ColorSpace::Untagged, 1 or 3 channels).

Source

pub const fn metadata(&self) -> GainMapMetadata

Exact rational ISO 21496-1 reconstruction metadata.

Source

pub const fn alternate_color_space(&self) -> Option<&'a ColorSpace>

Alternate rendition color space, if declared (required when application_space == Alternate).

Source

pub const fn orientation(&self) -> Orientation

Shared pending EXIF orientation for the aligned (base, gain_map) pair.

Source

pub const fn with_orientation( self, orientation: Orientation, ) -> DualLayerHdrView<'a>

Replace the shared pending EXIF orientation on this borrowed view.

Source

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.

Source

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>

Source§

fn clone(&self) -> DualLayerHdrView<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for DualLayerHdrView<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DualLayerHdrView<'a>

§

impl<'a> RefUnwindSafe for DualLayerHdrView<'a>

§

impl<'a> Send for DualLayerHdrView<'a>

§

impl<'a> Sync for DualLayerHdrView<'a>

§

impl<'a> Unpin for DualLayerHdrView<'a>

§

impl<'a> UnsafeUnpin for DualLayerHdrView<'a>

§

impl<'a> UnwindSafe for DualLayerHdrView<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.