[−][src]Trait dither::ditherer::Dither
A type of Dither. Available dithers are Stucki, Atkinson, FloydSteinberg, Burkes, JarvisJudiceNinke, Sierra3. See tanner helland's excellent writeup on dithering algorithms for details.
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,
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
Implementors
impl Dither for Atkinson
[src]
const DIV: f64
[src]
const OFFSETS: &'static [(isize, isize, f64)]
[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]
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,
impl Dither for Burkes
[src]
const DIV: f64
[src]
const OFFSETS: &'static [(isize, isize, f64)]
[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]
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,
impl Dither for FloydSteinberg
[src]
const DIV: f64
[src]
const OFFSETS: &'static [(isize, isize, f64)]
[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]
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,
impl Dither for JarvisJudiceNinke
[src]
const DIV: f64
[src]
const OFFSETS: &'static [(isize, isize, f64)]
[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]
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,
impl Dither for Sierra3
[src]
const DIV: f64
[src]
const OFFSETS: &'static [(isize, isize, f64)]
[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]
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,