[][src]Function photon_rs::effects::offset

pub fn offset(photon_image: &mut PhotonImage, channel_index: usize, offset: u32)

Adds an offset to the image by a certain number of pixels.

Arguments

  • img - A PhotonImage that contains a view into the image.
  • offset - The offset is added to the pixels in the image.

Example

// For example, to offset pixels by 30 pixels on the red channel:
use photon::effects;
photon::effects::offset(img, 0, 30);