[][src]Function photon::monochrome::single_channel_grayscale

pub fn single_channel_grayscale(photon_image: &mut PhotonImage, channel: usize)

Convert an image to grayscale by setting a pixel's 3 RGB values to a chosen channel's value.

Arguments

Example

To grayscale using only values from the Red channel:

monochrome::single_channel_grayscale(&mut img, 0);