pub extern "C" fn __wasm_bindgen_generated_alter_two_channels(
arg0: <PhotonImage as RefMutFromWasmAbi>::Abi,
arg1: <usize as FromWasmAbi>::Abi,
arg2: <i16 as FromWasmAbi>::Abi,
arg3: <usize as FromWasmAbi>::Abi,
arg4: <i16 as FromWasmAbi>::Abi
) -> <() as ReturnWasmAbi>::Abi
Expand description
Increment/decrement two channels’ values simultaneously by adding an amt to each channel per pixel.
Arguments
img
- A PhotonImage.channel1
- A usize from 0 to 2 that represents either the R, G or B channels.amt1
- The amount to increment/decrement the channel’s value by for that pixel.channel2
-A usize from 0 to 2 that represents either the R, G or B channels.amt2
- The amount to increment/decrement the channel’s value by for that pixel.
Example
// For example, to increase the values of the Red and Blue channels per pixel:
use photon_rs::channels::alter_two_channels;
use photon_rs::native::open_image;
let mut img = open_image("img.jpg").expect("File should open");
alter_two_channels(&mut img, 0_usize, 10_i16, 2_usize, 20_i16);