Skip to content

Commit

Permalink
chore: when make a big picture, skip the first
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Aug 5, 2023
1 parent 86e5072 commit 5ede21b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/filewriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ pub fn write_to_file_mutisource(bufferdatas: Vec<FrameInfo>, usestdout: bool) {
let mut buff = Cursor::new(Vec::new());
use image::imageops::overlay;
let mut image = images[0].clone();
for aimage in images {
overlay(&mut image, &aimage, 0, 0);
for aimage in images.iter().skip(1) {
overlay(&mut image, aimage, 0, 0);
}
if let Err(_e) = image.write_to(&mut buff, image::ImageFormat::Png) {
#[cfg(feature = "notify")]
Expand Down Expand Up @@ -250,8 +250,8 @@ pub fn write_to_file_mutisource(bufferdatas: Vec<FrameInfo>, usestdout: bool) {
let filefullname = file.to_str().unwrap();
use image::imageops::overlay;
let mut image = images[0].clone();
for aimage in images {
overlay(&mut image, &aimage, 0, 0);
for aimage in images.iter().skip(1) {
overlay(&mut image, aimage, 0, 0);
}
if image.save(&file).is_ok() {
tracing::info!("Image saved to {}", filefullname);
Expand Down

0 comments on commit 5ede21b

Please sign in to comment.