[][src]Function photon_rs::channels::alter_two_channels

pub fn alter_two_channels(
    img: &mut PhotonImage,
    channel1: usize,
    amt1: i16,
    channel2: usize,
    amt2: i16
)

Increment/decrement two channels' values simultaneously by adding an amt to each channel per pixel.

Arguments

  • img - A PhotonImage.
  • channel1 - A usize from 0 to 2 that represents either the R, G or B channels.
  • amt1 - The amount to increment/decrement the channel's value by for that pixel.
  • channel2 -A usize from 0 to 2 that represents either the R, G or B channels.
  • amt2 - The amount to increment/decrement the channel's value by for that pixel.

Example

// For example, to increase the values of the Red and Blue channels per pixel:
photon::channels::inc_two_channels(&mut img, 0, 10, 2, 20);