[][src]Function photon::multiple::replace_background

pub fn replace_background(
    photon_image: &mut PhotonImage,
    img2: &PhotonImage,
    background_color: Rgb
)

Change the background of an image (using a green screen/color screen).

Arguments

Example

// For example, to replace the background of ImageA (which is RGB value 20, 40, 60) with the background of ImageB:
use photon::multiple;
let rgb = Rgb{20, 40, 60};
photon::multiple::replace_background(img_b, img_a, rgb);