[][src]Trait dither::ditherer::Dither

pub trait Dither {
    const DIV: f64;
    const OFFSETS: &'static [(isize, isize, f64)];
    fn dither<P>(
        img: Img<P>,
        quantize: impl FnMut(P) -> (P, P)
    ) -> Img<P>
    where
        P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default
, { ... } }

Associated Constants

Loading content...

Provided methods

fn dither<P>(
    img: Img<P>,
    quantize: impl FnMut(P) -> (P, P)
) -> Img<P> where
    P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default

dither a 2d matrix. P is the type of pixel (u8, [RGB<f64, f64, f64>]); S is multiplible and divisble by a SCALAR but adds to ITSELF

Loading content...

Implementors

impl Dither for Atkinson[src]

fn dither<P>(
    img: Img<P>,
    quantize: impl FnMut(P) -> (P, P)
) -> Img<P> where
    P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default
[src]

impl Dither for Burkes[src]

fn dither<P>(
    img: Img<P>,
    quantize: impl FnMut(P) -> (P, P)
) -> Img<P> where
    P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default
[src]

impl Dither for FloydSteinberg[src]

fn dither<P>(
    img: Img<P>,
    quantize: impl FnMut(P) -> (P, P)
) -> Img<P> where
    P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default
[src]

impl Dither for JarvisJudiceNinke[src]

fn dither<P>(
    img: Img<P>,
    quantize: impl FnMut(P) -> (P, P)
) -> Img<P> where
    P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default
[src]

impl Dither for Sierra3[src]

fn dither<P>(
    img: Img<P>,
    quantize: impl FnMut(P) -> (P, P)
) -> Img<P> where
    P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default
[src]

impl Dither for Stucki[src]

fn dither<P>(
    img: Img<P>,
    quantize: impl FnMut(P) -> (P, P)
) -> Img<P> where
    P: Add<Output = P> + Mul<f64, Output = P> + Div<f64, Output = P> + Clone + Default
[src]

Loading content...