Function photon_rs::effects::multiple_offsets
source · pub fn multiple_offsets(
photon_image: &mut PhotonImage,
offset: u32,
channel_index: usize,
channel_index2: usize
)
Expand description
Adds multiple offsets to the image by a certain number of pixels (on two channels).
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 add a 30-pixel offset to both the red and blue channels:
use photon_rs::effects::multiple_offsets;
use photon_rs::native::open_image;
let mut img = open_image("img.jpg").expect("File should open");
multiple_offsets(&mut img, 30_u32, 0_usize, 2_usize);