pub fn apply_stamp(image: &mut RgbImage, x: u32, y: u32, stamp: &RgbaImage) {
    for yy in 0..stamp.height() {
        for xx in 0..stamp.width() {
            let mut base_pixel = image.get_pixel(xx + x, yy + y).to_rgba();
            let stamp_pixel = stamp.get_pixel(xx, yy);
            base_pixel.blend(stamp_pixel);
            *image.get_pixel_mut(xx + x, yy + y) = base_pixel.to_rgb();
        }
    }
}
/// A trivial function which an rgba stamp on the image at x,y position.
A trivial function which an rgba stamp on the image at x,y position.
A trivial function which an rgba stamp on the image at x y position .
pub fn apply_stamp(image: &mut RgbImage, x: u32, y: u32, stamp: &RgbaImage) {
    for yy in 0..stamp.height() {
        for xx in 0..stamp.width() {
            let mut base_pixel = image.get_pixel(xx + x, yy + y).to_rgba();
            let stamp_pixel = stamp.get_pixel(xx, yy);
            base_pixel.blend(stamp_pixel);
            *image.get_pixel_mut(xx + x, yy + y) = base_pixel.to_rgb();
        }
    }
}
pub fn apply_stamp ( image : & mut RgbImage , x : u32 , y : u32 , stamp : & RgbaImage ) { for yy in 0 .. stamp . height ( ) { for xx in 0 .. stamp . width ( ) { let mut base_pixel = image . get_pixel ( xx + x , yy + y ) . to_rgba ( ) ; let stamp_pixel = stamp . get_pixel ( xx , yy ) ; base_pixel . blend ( stamp_pixel ) ; * image . get_pixel_mut ( xx + x , yy + y ) = base_pixel . to_rgb ( ) ; } } }
A trivial function which an rgba stamp on the image at x,y position.
A trivial function which an rgba stamp on the image at x y position .
image
&mut RgbImage
x
u32
y
u32
stamp
&RgbaImage