Function photon_rs::channels::alter_green_channel
source · pub fn alter_green_channel(img: &mut PhotonImage, amt: i16)
Expand description
Increment or decrement every pixel’s Green channel by a constant.
Arguments
img
- A PhotonImage.amt
- The amount to increment/decrement the channel’s value by for that pixel.
Example
// For example, to increase the Green channel for all pixels by 20:
use photon_rs::channels::alter_green_channel;
use photon_rs::native::open_image;
let mut img = open_image("img.jpg").expect("File should open");
alter_green_channel(&mut img, 20_i16);