mirror of
https://github.com/G2-Games/lbee-utils.git
synced 2025-04-19 23:32:55 -05:00
Made batch conversions not fail on missing images
This commit is contained in:
parent
1e8683b25b
commit
69acee848d
1 changed files with 6 additions and 1 deletions
|
@ -179,7 +179,8 @@ fn main() {
|
||||||
Error::raw(
|
Error::raw(
|
||||||
ErrorKind::ValueValidation,
|
ErrorKind::ValueValidation,
|
||||||
format!("Could not open replacement file as an image: {}\n", final_replacement.into_os_string().to_str().unwrap())
|
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();
|
let repl_img = repl_img.to_rgba8();
|
||||||
|
@ -245,6 +246,10 @@ fn main() {
|
||||||
cz.set_bitmap(repl_img.into_raw());
|
cz.set_bitmap(repl_img.into_raw());
|
||||||
cz.remove_palette();
|
cz.remove_palette();
|
||||||
|
|
||||||
|
if let Some(depth) = depth {
|
||||||
|
cz.header_mut().set_depth(*depth as u16)
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(ver) = version {
|
if let Some(ver) = version {
|
||||||
match cz.header_mut().set_version(*ver) {
|
match cz.header_mut().set_version(*ver) {
|
||||||
Ok(_) => (),
|
Ok(_) => (),
|
||||||
|
|
Loading…
Reference in a new issue