Made batch conversions not fail on missing images

This commit is contained in:
G2-Games 2024-06-26 21:28:14 -05:00
parent 1e8683b25b
commit 69acee848d

View file

@ -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(_) => (),