pub fn alter_blue_channel(img: &mut PhotonImage, amt: i16)
Expand description

Increment or decrement every pixel’s Blue channel by a constant.

Arguments

  • img - A PhotonImage.
  • amt - The amount to increment or decrement the channel’s value by for that pixel.

Example

// For example, to increase the Blue channel for all pixels by 10:
use photon_rs::channels::alter_blue_channel;
use photon_rs::native::open_image;

let mut img = open_image("img.jpg").expect("File should open");
alter_blue_channel(&mut img, 10_i16);