[][src]Function photon::monochrome::monochrome

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

Apply a monochrome effect of a certain colour.

It does so by averaging the R, G, and B values of a pixel, and then adding a separate value to that averaged value for each channel to produce a tint.

Arguments

Example

// For example, to apply a monochrome effect to an image:
use photon::monochrome;
monochrome::monochroma(&mut img, 40, 50, 100);