use image::{GenericImage, GenericImageView, ImageBuffer, Pixel, Primitive}; /// Example showcasing a generic implementation of image concatenation. /// /// The example images are coming from https://placeholder.com/ /// /// Run from the root of the repository with: /// cargo run --release --example concat fn main() { h_concat(&[ image::open("examples/concat/200x300.png").unwrap(), image::open("examples/concat/300x300.png").unwrap(), image::open("examples/concat/400x300.png").unwrap(), ]) .save("examples/concat/concatenated_900x300.png") .unwrap(); } /// Concatenate horizontally images with the same pixel type. fn h_concat(images: &[I]) -> ImageBuffer
>
where
I: GenericImageView