Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default value for interlace to ensure it is kept when nx is used #620

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ transformation and may be unsuitable for some applications.")
.action(ArgAction::SetTrue),
)
.arg(
// Note: The default value is not explicitly set here, as it is dependant on the `--nx` flag.
Arg::new("interlace")
.help("Set PNG interlacing type (0, 1, keep)")
.help("Set PNG interlacing type (0, 1, keep) [default: 0]")
.long_help("\
Set the PNG interlacing type, where <type> is one of:

Expand All @@ -181,11 +182,12 @@ Set the PNG interlacing type, where <type> is one of:
keep => Keep the existing interlacing type of each image

Note that interlacing can add 25-50% to the size of an optimized image. Only use it if you \
believe the benefits outweigh the costs for your use case.")
believe the benefits outweigh the costs for your use case.

[default: 0]")
.short('i')
.long("interlace")
.value_name("type")
.default_value("0")
.value_parser(["0", "1", "keep"])
.hide_possible_values(true),
)
Expand Down
Loading