From 69acee848d91a19e15c1ed75ff5c4ed6e973c646 Mon Sep 17 00:00:00 2001 From: G2-Games <ke0bhogsg@gmail.com> Date: Wed, 26 Jun 2024 21:28:14 -0500 Subject: [PATCH] Made batch conversions not fail on missing images --- utils/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/src/main.rs b/utils/src/main.rs index cf39bfa..4929a8a 100644 --- a/utils/src/main.rs +++ b/utils/src/main.rs @@ -179,7 +179,8 @@ fn main() { Error::raw( ErrorKind::ValueValidation, format!("Could not open replacement file as an image: {}\n", final_replacement.into_os_string().to_str().unwrap()) - ).exit() + ).print().unwrap(); + continue; }, }; let repl_img = repl_img.to_rgba8(); @@ -245,6 +246,10 @@ fn main() { cz.set_bitmap(repl_img.into_raw()); cz.remove_palette(); + if let Some(depth) = depth { + cz.header_mut().set_depth(*depth as u16) + } + if let Some(ver) = version { match cz.header_mut().set_version(*ver) { Ok(_) => (),