[][src]Function photon::multiple::blend

pub fn blend(
    photon_image: &mut PhotonImage,
    photon_image2: &PhotonImage,
    blend_mode: &str
)

Blend two images together. The blend_mode (3rd param) determines which blending mode to use; change this for varying effects. The blend modes available include: overlay, over, atop, xor, multiply, burn, soft_light, hard_light difference, lighten, darken, dodge, plus, exclusion (more to come) NOTE: The first image must be smaller than the second image passed as params. If the first image were larger than the second, then there would be overflowing pixels which would have no corresponding pixels in the second image.

Arguments

Example

// For example, to add a watermark to an image at x: 30, y: 40:
use photon::multiple;
photon::multiple::watermark(img, watermark, 30, 40);