image::imageops

Function tile

source
pub fn tile<I, J>(bottom: &mut I, top: &J)
where I: GenericImage, J: GenericImageView<Pixel = I::Pixel>,
Expand description

Tile an image by repeating it multiple times

ยงExamples

use image::{RgbaImage};

let mut img = RgbaImage::new(1920, 1080);
let tile = image::open("tile.png").unwrap();

image::imageops::tile(&mut img, &tile);
img.save("tiled_wallpaper.png").unwrap();