Compare commits

...

2 commits

2 changed files with 10 additions and 1 deletions

4
utils/src/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
analyze/
from/
to/
replacement/

View file

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