[][src]Function photon::channels::swap_channels

pub fn swap_channels(img: &mut PhotonImage, channel1: usize, channel2: usize)

Swap two channels.

Arguments

Example

// For example, to swap the values of the Red channel with the values of the Blue channel:
photon::channels::swap_channels(&mut img, 0, 2);