Struct exoquant::ditherer::Ordered [] [src]

pub struct Ordered;

A 2x2 ordered dithering.

An ordered ditherer features slightly worse dithering quality than a floyd-steinberg ditherer, but might look more pleasing as it appears less like random noise. An ordered dithered image also has the advantage of compressing a lot better than floyd-steinberg dithered ones.

Note: don't use ordered dithering on images that are intended to be down-scaled later or risk moire artifacts.

Trait Implementations

impl Ditherer for Ordered
[src]

fn remap<'a>(&'a self, image: Box<Iterator<Item=Colorf> + 'a>, width: usize, map: &'a ColorMap, _: &'a ColorSpace) -> Box<Iterator<Item=usize> + 'a>

Remaps an iterator of input pixel (float-)colors of an Image to an Iterator of palette indices. Read more