pub extern "C" fn __wasm_bindgen_generated_saturate_lch(
arg0: <PhotonImage as RefMutFromWasmAbi>::Abi,
arg1: <f32 as FromWasmAbi>::Abi
) -> <() as ReturnWasmAbi>::Abi
Expand description
Increase the image’s saturation in the LCh colour space.
Arguments
img
- A PhotonImage.level
- Float value from 0 to 1 representing the level to which to increase the saturation by. Thelevel
must be from 0 to 1 in floating-point,f32
format. Increasing saturation by 80% would be represented by alevel
of 0.8
Example
// For example to increase saturation by 40% in the Lch colour space:
use photon_rs::colour_spaces::saturate_lch;
use photon_rs::native::open_image;
// Open the image. A PhotonImage is returned.
let mut img = open_image("img.jpg").expect("File should open");
saturate_lch(&mut img, 0.4_f32);