photon_rs::monochrome
pub fn grayscale_shades(photon_image: &mut PhotonImage, num_shades: u8)
Employ only a limited number of gray shades in an image.
photon_image
num_shades
// For example, to limit an image to four shades of gray only: monochrome::grayscale_shades(&mut img, 4);