[][src]Function photon::colour_spaces::desaturate_hsv

pub fn desaturate_hsv(img: &mut PhotonImage, level: f32)

Desaturate the image by a specified amount in the HSV colour space.

Arguments

Example

// For example to desaturate an image by 10% in the HSV colour space:
use photon::color_spaces::desaturate_hsv;
 
// Open the image. A PhotonImage is returned.
let img: PhotonImage = open_image("images/mountains.PNG");
 
desaturate_hsv(&mut img, 0.1);