[][src]Function photon_rs::colour_spaces::__wasm_bindgen_generated_lch

pub extern "C" fn __wasm_bindgen_generated_lch(
    arg0: <PhotonImage as RefMutFromWasmAbi>::Abi,
    arg1: <str as RefFromWasmAbi>::Abi,
    arg2: <f32 as FromWasmAbi>::Abi
) -> <() as ReturnWasmAbi>::Abi

Apply gamma correction. Image manipulation effects in the LCh colour space

Effects include:

  • saturate - Saturation increase.
  • desaturate - Desaturate the image.
  • shift_hue - Hue rotation by a specified number of degrees.
  • darken - Decrease the brightness.
  • lighten - Increase the brightness.

Arguments

  • photon_image - A PhotonImage.
  • mode - The effect desired to be applied. Choose from: saturate, desaturate, shift_hue, darken, lighten
  • amt - A float value from 0 to 1 which represents the amount the effect should be increased by.

Example

// For example to increase the saturation by 10%:
use photon::color_spaces::lch;
 
// Open the image. A PhotonImage is returned.
let img: PhotonImage = open_image("images/flowers.PNG");
 
lch(&mut img, "saturate", 0.1);