Only change interlacing if we have to
This commit is contained in:
parent
c9ea565d1d
commit
0866eb01ea
1 changed files with 6 additions and 4 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -100,10 +100,12 @@ pub fn optimize(filepath: &Path, opts: &Options) -> Result<(), String> {
|
|||
}
|
||||
|
||||
if let Some(interlacing) = opts.interlace {
|
||||
if png.change_interlacing(interlacing) {
|
||||
something_changed = true;
|
||||
// TODO: Print message to terminal
|
||||
};
|
||||
if interlacing != png.ihdr_data.interlaced {
|
||||
if png.change_interlacing(interlacing) {
|
||||
something_changed = true;
|
||||
// TODO: Print message to terminal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if opts.idat_recoding || something_changed {
|
||||
|
|
|
|||
Loading…
Reference in a new issue