Skip to content

Commit

Permalink
Add warning when interlacing was not enabled as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
andrews05 authored and AlexTMjugador committed Jan 16, 2025
1 parent 3a6b792 commit 6c7ab5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ fn optimize_png(
);
}

if opts.interlace == Some(Interlacing::Adam7) && png.raw.ihdr.interlaced != Interlacing::Adam7 {
warn!("Interlacing was not enabled as it would result in a larger file. To override this, use `--force`.");
}

#[cfg(feature = "sanity-checks")]
assert!(sanity_checks::validate_output(&output, original_data));

Expand Down

0 comments on commit 6c7ab5d

Please sign in to comment.