Function photon_rs::effects::primary

source ·
pub fn primary(img: &mut PhotonImage)
Expand description

Reduces an image to the primary colours.

Arguments

  • img - A PhotonImage that contains a view into the image.

Example

// For example, to add a primary colour effect to an image of type `DynamicImage`:
use photon_rs::effects::primary;
use photon_rs::native::open_image;

let mut img = open_image("img.jpg").expect("File should open");
primary(&mut img);