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

Required Methods

Provided Methods

Implementations on Foreign Types

impl<M> GammaPixel for RGBA<M> where
    M: Clone + Into<f32> + GammaComponent
[src]

[src]

[src]

impl<M> GammaPixel for BGRA<M> where
    M: Clone + Into<f32> + GammaComponent
[src]

[src]

[src]

impl<M> GammaPixel for RGB<M> where
    M: GammaComponent
[src]

[src]

[src]

impl<M> GammaPixel for BGR<M> where
    M: GammaComponent
[src]

[src]

[src]

impl<M> GammaPixel for GreyAlpha<M> where
    M: Copy + Clone + Into<f32> + GammaComponent
[src]

[src]

[src]

impl<M> GammaPixel for Grey<M> where
    M: Copy + GammaComponent
[src]

[src]

[src]

Implementors