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

pub trait Dither<P> {
    fn dither(&self, img: Img<P>, quantize: impl FnMut(P) -> (P, P)) -> Img<P>;
}

dither a 2d matrix. P is the type of pixel; in practice, it is either f64 or [RGB<f64>][RGB]

Required methods

fn dither(&self, img: Img<P>, quantize: impl FnMut(P) -> (P, P)) -> Img<P>

Loading content...

Implementors

impl<'a, P> Dither<P> for Ditherer<'a> where
    P: Add<Output = P> + Clone + Default,
    P: Mul<f64, Output = P> + Div<f64, Output = P>, 
[src]

fn dither(&self, img: Img<P>, quantize: impl FnMut(P) -> (P, P)) -> Img<P>[src]

dither an image using the specified offsets and divisor. P is the type of pixel; in practice, it is either f64 or [RGB<f64]

Loading content...