Enum image_canvas::color::Transfer
source · [−]#[repr(u8)]
#[non_exhaustive]
pub enum Transfer {
Bt709,
Bt470M,
Bt601,
Smpte240,
Linear,
Srgb,
Bt2020_10bit,
Bt2020_12bit,
Smpte2084,
Bt2100Pq,
Bt2100Hlg,
Bt2100Scene,
}
Expand description
Transfer functions from encoded chromatic samples to physical quantity.
Ignoring viewing environmental effects, this describes a pair of functions that are each others inverse: An electro-optical transfer (EOTF) and opto-electronic transfer function (OETF) that describes how scene lighting is encoded as an electric signal. These are applied to each stimulus value.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Bt709
Non-linear electrical data of Bt.709
Bt470M
Bt601
Non-linear electrical data of Bt.601
Smpte240
Non-linear electrical data of Smpte-240
Linear
Linear color in display luminance.
Srgb
Non-linear electrical data of Srgb
Technically, we’re implementing scRGB since we handle negative primaries just well enough.
Bt2020_10bit
Non-linear electrical data of Bt2020 that was 10-bit quantized
Bt2020_12bit
Non-linear electrical data of Bt2020 that was 12-bit quantized FIXME(color): not yet supported, panics on use.
Smpte2084
Non-linear electrical data of Smpte-2048
Bt2100Pq
Another name for Smpte2084. FIXME(color): not yet supported, panics on use.
Bt2100Hlg
Non-linear electrical data of Bt2100 Hybrid-Log-Gamma. FIXME(color): not yet supported, panics on use.
Bt2100Scene
Linear color in scene luminance of Bt2100.
This is perfect for an artistic composition pipeline. The rest of the type system will
ensure this is not accidentally and unwittingly mixed with Linear
but otherwise this is
treated as Linear
. You might always transmute.
FIXME(color): not yet supported, panics on use.
Trait Implementations
impl Copy for Transfer
impl Eq for Transfer
impl StructuralEq for Transfer
impl StructuralPartialEq for Transfer
Auto Trait Implementations
impl RefUnwindSafe for Transfer
impl Send for Transfer
impl Sync for Transfer
impl Unpin for Transfer
impl UnwindSafe for Transfer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more