[][src]Function imagequant_sys::liq_set_dithering_level

pub unsafe extern "C" fn liq_set_dithering_level(
    res: &mut liq_result,
    dither_level: f32
) -> liq_error

Enables/disables dithering in liq_write_remapped_image().

Dithering level must be between 0 and 1 (inclusive). Dithering level 0 enables fast non-dithered remapping. Otherwise a variation of Floyd-Steinberg error diffusion is used.

Precision of the dithering algorithm depends on the speed setting, see liq_set_speed().

Returns LIQ_VALUE_OUT_OF_RANGE if the dithering level is outside the 0-1 range.