parent
cf9fc98047
commit
e9c44cbc0b
3 changed files with 12 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
**Version 0.3.1 (unreleased)**
|
||||
**Version 0.4.0 (unreleased)**
|
||||
- Performance optimizations
|
||||
- [SEMVER_MAJOR] `-s` automatically infers `--strip safe`
|
||||
|
||||
**Version 0.3.0**
|
||||
- Properly decode interlaced images
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ More advanced options can be found by running `oxipng -h`.
|
|||
## History
|
||||
|
||||
Oxipng began as a complete rewrite of the OptiPNG project,
|
||||
which is assumed to be dead as no commit has been made to it since March 2014.
|
||||
which was assumed to be dead as no commit had been made to it since March 2014.
|
||||
The name has been changed to avoid confusion and potential legal issues.
|
||||
|
||||
The core goal of rewriting OptiPNG was to implement multithreading,
|
||||
|
|
|
|||
10
src/main.rs
10
src/main.rs
|
|
@ -204,8 +204,12 @@ fn main() {
|
|||
.arg(Arg::with_name("strip")
|
||||
.help("Strip metadata objects ['safe', 'all', or comma-separated list]")
|
||||
.long("strip")
|
||||
.takes_value(true)
|
||||
.conflicts_with("strip-safe"))
|
||||
.arg(Arg::with_name("strip-safe")
|
||||
.help("Strip safely-removable metadata objects")
|
||||
.short("s")
|
||||
.takes_value(true))
|
||||
.conflicts_with("strip"))
|
||||
.after_help("Optimization levels:
|
||||
-o 0 => --zc 3 --nz (0 or 1 trials)
|
||||
-o 1 => --zc 9 (1 trial, determined heuristically)
|
||||
|
|
@ -504,6 +508,10 @@ fn parse_opts_into_struct(matches: &ArgMatches, opts: &mut oxipng::Options) -> R
|
|||
}
|
||||
}
|
||||
|
||||
if matches.is_present("strip-safe") {
|
||||
opts.strip = png::Headers::Safe;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue