Function photon_rs::colour_spaces::hue_rotate_hsv
source · pub fn hue_rotate_hsv(img: &mut PhotonImage, degrees: f32)
Expand description
Shift hue by a specified number of degrees in the HSV colour space.
Arguments
img
- A PhotonImage.mode
- A float value from 0 to 1 which is the amount to shift the hue by, or hue rotate by.
Example
// For example to hue rotate/shift the hue by 120 degrees in the HSV colour space:
use photon_rs::colour_spaces::hue_rotate_hsv;
use photon_rs::native::open_image;
// Open the image. A PhotonImage is returned.
let mut img = open_image("img.jpg").expect("File should open");
hue_rotate_hsv(&mut img, 120_f32);