mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
change dithering algorithm to BURKES
This commit is contained in:
parent
069b54f86b
commit
7f90e6e999
1 changed files with 1 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ impl From<Img<RGB<u8>>> for Bitmap {
|
||||||
let bit_depth = 1;
|
let bit_depth = 1;
|
||||||
let quantize = dither::create_quantize_n_bits_func(bit_depth).unwrap();
|
let quantize = dither::create_quantize_n_bits_func(bit_depth).unwrap();
|
||||||
let bw_img = img.convert_with(|rgb| rgb.to_chroma_corrected_black_and_white());
|
let bw_img = img.convert_with(|rgb| rgb.to_chroma_corrected_black_and_white());
|
||||||
let ditherer = dither::ditherer::FLOYD_STEINBERG;
|
let ditherer = dither::ditherer::BURKES;
|
||||||
let output_img = ditherer.dither(bw_img, quantize);
|
let output_img = ditherer.dither(bw_img, quantize);
|
||||||
|
|
||||||
let bm_width: usize = output_img.width().try_into().unwrap();
|
let bm_width: usize = output_img.width().try_into().unwrap();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue