Trait dssim::GammaPixel
[−]
[src]
pub trait GammaPixel { type Component: GammaComponent; type Output; fn to_linear(&self, gamma_lut: &[f32]) -> Self::Output; fn make_lut() -> Vec<f32> { ... } }
Downsampling should be done in linear RGB color space.
Used by ToRGBAPLU
This trait provides gamma to linear conversion via lookup table, and there's implementation for sRGB for common RGB types.
Associated Types
type Component: GammaComponent
type Output
Required Methods
Provided Methods
Implementations on Foreign Types
impl<M> GammaPixel for RGBA<M> where
M: Clone + Into<f32> + GammaComponent,
[src]
M: Clone + Into<f32> + GammaComponent,
impl<M> GammaPixel for BGRA<M> where
M: Clone + Into<f32> + GammaComponent,
[src]
M: Clone + Into<f32> + GammaComponent,
impl<M> GammaPixel for RGB<M> where
M: GammaComponent,
[src]
M: GammaComponent,
impl<M> GammaPixel for BGR<M> where
M: GammaComponent,
[src]
M: GammaComponent,
impl<M> GammaPixel for GreyAlpha<M> where
M: Copy + Clone + Into<f32> + GammaComponent,
[src]
M: Copy + Clone + Into<f32> + GammaComponent,
impl<M> GammaPixel for Grey<M> where
M: Copy + GammaComponent,
[src]
M: Copy + GammaComponent,
Implementors
impl<M> GammaPixel for M where
M: GammaComponent, type Component = M; type Output = f32;