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 let Some(interlacing) = opts.interlace {
|
||||||
if png.change_interlacing(interlacing) {
|
if interlacing != png.ihdr_data.interlaced {
|
||||||
something_changed = true;
|
if png.change_interlacing(interlacing) {
|
||||||
// TODO: Print message to terminal
|
something_changed = true;
|
||||||
};
|
// TODO: Print message to terminal
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.idat_recoding || something_changed {
|
if opts.idat_recoding || something_changed {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue