Function photon_rs::effects::offset_red
source · pub fn offset_red(img: &mut PhotonImage, offset_amt: u32)
Expand description
Adds an offset to the red channel by a certain number of pixels.
Arguments
img
- A PhotonImage that contains a view into the image.offset
- The offset you want to move the red channel by.
Example
// For example, to add an offset to the red channel by 30 pixels.
use photon_rs::effects::offset_red;
use photon_rs::native::open_image;
let mut img = open_image("img.jpg").expect("File should open");
offset_red(&mut img, 30_u32);