pub extern "C" fn __wasm_bindgen_generated_gamma_correction(
    arg0: <PhotonImage as RefMutFromWasmAbi>::Abi,
    arg1: <f32 as FromWasmAbi>::Abi,
    arg2: <f32 as FromWasmAbi>::Abi,
    arg3: <f32 as FromWasmAbi>::Abi
) -> <() as ReturnWasmAbi>::Abi
Expand description

Applies gamma correction to an image.

Arguments

  • photon_image - A PhotonImage that contains a view into the image.
  • red - Gamma value for red channel.
  • green - Gamma value for green channel.
  • blue - Gamma value for blue channel.

Example

// For example, to turn an image of type `PhotonImage` into a gamma corrected image:
use photon_rs::colour_spaces::gamma_correction;
use photon_rs::native::open_image;

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