gray_image!() { /* proc-macro */ }Expand description
Load a image and compress it to grayscale image of specified depth.
let (w, h, img_raw) = text_image::gray_image!("pattern128x128.png", Gray4);
let image: ImageRaw<Gray4, LittleEndian> = ImageRaw::new(img_raw, w);
image.draw(&mut fb).unwrap();