[][src]Function photon_rs::effects::tint

pub fn tint(
    photon_image: &mut PhotonImage,
    r_offset: u32,
    g_offset: u32,
    b_offset: u32
)

Tint an image by adding an offset to averaged RGB channel values.

Arguments

  • img - A PhotonImage that contains a view into the image.
  • r_offset - The amount the R channel should be incremented by.
  • g_offset - The amount the G channel should be incremented by.
  • b_offset - The amount the B channel should be incremented by.

Example

// For example, to tint an image of type `PhotonImage`:
photon::tint(img, 10, 20, 15);