Struct exoquant::ditherer::FloydSteinberg [] [src]

pub struct FloydSteinberg(_, _, _, _, _);

A few variants of a Floyd-Steinberg ditherer.

Methods

impl FloydSteinberg
[src]

fn new() -> FloydSteinberg

Returns a floyd-steinberg variant that reduces color bleeding.

fn vanilla() -> FloydSteinberg

Returns a vanilla floyd-steinberg ditherer as originally described.

fn checkered() -> FloydSteinberg

Returns a modified floyd-steinber ditherer slightly favoring checker board patterns.

The resulting dithering looks a little less like random noise. Don't use for images that are later down-scaled, as that will risk moire artifacts.

Trait Implementations

impl Ditherer for FloydSteinberg
[src]

fn remap<'a>(&'a self, image: Box<Iterator<Item=Colorf> + 'a>, width: usize, map: &'a ColorMap, colorspace: &'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