Add warnings about stripping APNGs
This commit is contained in:
parent
041e5f084b
commit
ff06573c9f
2 changed files with 6 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ fn main() {
|
|||
)
|
||||
.arg(
|
||||
Arg::new("strip")
|
||||
.help("Strip metadata objects ['safe', 'all', or comma-separated list]")
|
||||
.help("Strip metadata objects ['safe', 'all', or comma-separated list]\nCAUTION: stripping 'all' will convert APNGs to standard PNGs")
|
||||
.long("strip")
|
||||
.value_name("mode")
|
||||
.conflicts_with("strip-safe"),
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use crate::interlace::{deinterlace_image, interlace_image, Interlacing};
|
|||
use crate::Options;
|
||||
use bitvec::bitarr;
|
||||
use libdeflater::{CompressionLvl, Compressor};
|
||||
use log::warn;
|
||||
use rgb::ComponentSlice;
|
||||
use rustc_hash::FxHashMap;
|
||||
use std::fs::File;
|
||||
|
|
@ -112,6 +113,10 @@ impl PngData {
|
|||
name: chunk.name,
|
||||
data: chunk.data.to_owned(),
|
||||
})
|
||||
} else if chunk.name == *b"acTL" {
|
||||
warn!(
|
||||
"Stripping animation data from APNG - image will become standard PNG"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue