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
impl Clone for NoTransfer
Source§fn clone(&self) -> NoTransfer
fn clone(&self) -> NoTransfer
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 NoTransfer
impl Debug for NoTransfer
Source§impl Default for NoTransfer
impl Default for NoTransfer
Source§fn default() -> NoTransfer
fn default() -> NoTransfer
Returns the “default value” for a type. Read more
Source§impl TransferCurve for NoTransfer
impl TransferCurve for NoTransfer
Source§type Luts = ()
type Luts = ()
Cached state (LUTs, etc.). Built once by
build_luts(), passed to batch methods. Read moreSource§fn to_linear(&self, v: f32) -> f32
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
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
fn is_identity(&self) -> bool
Whether this TF is the identity (no conversion needed).
Source§fn build_luts(&self) -> Self::Luts
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,
)
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,
)
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,
)
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,
)
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: &())
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: &())
fn linear_i12_to_u8(&self, src: &[i16], dst: &mut [u8], _luts: &())
Convert a row of linear i12 to u8 encoded pixels.
impl Copy for NoTransfer
Auto Trait Implementations§
impl Freeze for NoTransfer
impl RefUnwindSafe for NoTransfer
impl Send for NoTransfer
impl Sync for NoTransfer
impl Unpin for NoTransfer
impl UnsafeUnpin for NoTransfer
impl UnwindSafe for NoTransfer
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