Add warning when interlacing was not enabled as requested

This commit is contained in:
Andrew 2025-01-15 19:53:18 +13:00 committed by Alejandro González
parent 3a6b792ca1
commit 6c7ab5d79f

View file

@ -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));