Skip to main content

NoTransfer

Struct NoTransfer 

Source
pub struct NoTransfer;
Expand description

Identity transfer function: no conversion.

Used when pixel data is already in the desired space, or when resizing should happen in the encoded domain (gamma-space resize). All batch methods are trivial copies/scales.

Trait Implementations§

Source§

impl Clone for NoTransfer

Source§

fn clone(&self) -> NoTransfer

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for NoTransfer

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for NoTransfer

Source§

fn default() -> NoTransfer

Returns the “default value” for a type. Read more
Source§

impl TransferCurve for NoTransfer

Source§

type Luts = ()

Cached state (LUTs, etc.). Built once by build_luts(), passed to batch methods. Read more
Source§

fn to_linear(&self, v: f32) -> f32

Encode a linear-light value to this TF’s encoded space. Both input and output are in [0, 1] for SDR TFs.
Source§

fn from_linear(&self, v: f32) -> f32

Decode a value from this TF’s encoded space to linear light.
Source§

fn is_identity(&self) -> bool

Whether this TF is the identity (no conversion needed).
Source§

fn build_luts(&self) -> Self::Luts

Build or retrieve cached LUTs.
Source§

fn u8_to_linear_f32( &self, src: &[u8], dst: &mut [f32], _luts: &(), _channels: usize, _has_alpha: bool, premul: bool, )

Convert a row of u8 encoded pixels to premultiplied linear f32. Read more
Source§

fn linear_f32_to_u8( &self, src: &[f32], dst: &mut [u8], _luts: &(), _channels: usize, _has_alpha: bool, unpremul: bool, )

Convert a row of premultiplied linear f32 to u8 encoded pixels. Read more
Source§

fn u16_to_linear_f32( &self, src: &[u16], dst: &mut [f32], _luts: &(), _channels: usize, _has_alpha: bool, premul: bool, )

Convert a row of u16 encoded pixels to premultiplied linear f32. Read more
Source§

fn linear_f32_to_u16( &self, src: &[f32], dst: &mut [u16], _luts: &(), _channels: usize, _has_alpha: bool, unpremul: bool, )

Convert premultiplied linear f32 to u16 encoded pixels.
Source§

fn u8_to_linear_i12(&self, src: &[u8], dst: &mut [i16], _luts: &())

Convert a row of u8 encoded pixels to linear i12 (0-4095). All channels converted; no premul/unpremul (I16Work doesn’t support premul).
Source§

fn linear_i12_to_u8(&self, src: &[i16], dst: &mut [u8], _luts: &())

Convert a row of linear i12 to u8 encoded pixels.
Source§

fn f32_to_linear_inplace( &self, row: &mut [f32], _channels: usize, _has_alpha: bool, premul: bool, )

Convert f32 encoded values to premultiplied linear f32 in-place.
Source§

fn linear_to_f32_inplace( &self, row: &mut [f32], _channels: usize, _has_alpha: bool, unpremul: bool, )

Convert premultiplied linear f32 to f32 encoded in-place. Does NOT clamp — output can have values outside [0, 1] for wide gamut.
Source§

impl Copy for NoTransfer

Auto Trait Implementations§

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.