Function photon_rs::monochrome::g_grayscale
source · pub fn g_grayscale(photon_image: &mut PhotonImage)
Expand description
Convert an image to grayscale by setting a pixel’s 3 RGB values to the Green channel’s value.
Arguments
photon_image
- A PhotonImage.
Example
use photon_rs::monochrome::g_grayscale;
use photon_rs::native::open_image;
let mut img = open_image("img.jpg").expect("File should open");
g_grayscale(&mut img);