Skip to main content

dither

Function dither 

Source
pub fn dither(
    image: &Image,
    settings: OneBitSettings,
) -> Result<Vec<u8>, String>
Expand description

The one-bit picture file of image made by settings: one style the image’s size, and a mask if a pixel is see-through. Its source size is the image’s own. An error, in plain words, for a picture too big for the file (a side over 65,535 pixels), with no pixels or short of them, or for one with a grey under Dither::None.