Trait dssim_core::GammaPixel[][src]

pub trait GammaPixel {
    type Component: GammaComponent;
    type Output;
    fn to_linear(
        &self,
        gamma_lut: &<Self::Component as GammaComponent>::Lut
    ) -> Self::Output; fn make_lut() -> <Self::Component as GammaComponent>::Lut { ... } }

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

Loading content...

Required methods

fn to_linear(
    &self,
    gamma_lut: &<Self::Component as GammaComponent>::Lut
) -> Self::Output
[src]

Loading content...

Provided methods

Loading content...

Implementations on Foreign Types

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

type Component = M

type Output = RGBAPLU

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

type Component = M

type Output = RGBAPLU

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

type Component = M

type Output = RGBAPLU

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

type Component = M

type Output = RGBAPLU

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

type Component = M

type Output = RGBAPLU

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

type Component = M

type Output = RGBAPLU

Loading content...

Implementors

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

type Component = M

type Output = f32

Loading content...