[][src]Function dither::create_convert_quantized_to_palette_func

pub fn create_convert_quantized_to_palette_func(
    front: RGB<u8>,
    back: RGB<u8>
) -> impl Fn(f64) -> RGB<f64>

create a function that converts a quantized black-and-white image to the appropriate palette. i.e,

let r2b = create_convert_quantized_to_palette_func(RGB(255, 0, 0), RGB(0, 0, 255));
assert_eq!(r2b(55.), RGB(55., 0., 200.));