Skip to content

Commit e2c5b45

Browse files
authored
Remove default value for interlace to ensure it is kept when nx is used (#620)
Fixes #619. Interlacing still defaults to 0 when `--nx` is not specified and can still be explicitly set even if it is (e.g. `-i 0 --nx` will still deinterlace).
1 parent 290bf9d commit e2c5b45

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cli.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ transformation and may be unsuitable for some applications.")
171171
.action(ArgAction::SetTrue),
172172
)
173173
.arg(
174+
// Note: The default value is not explicitly set here, as it is dependant on the `--nx` flag.
174175
Arg::new("interlace")
175-
.help("Set PNG interlacing type (0, 1, keep)")
176+
.help("Set PNG interlacing type (0, 1, keep) [default: 0]")
176177
.long_help("\
177178
Set the PNG interlacing type, where <type> is one of:
178179
@@ -181,11 +182,12 @@ Set the PNG interlacing type, where <type> is one of:
181182
keep => Keep the existing interlacing type of each image
182183
183184
Note that interlacing can add 25-50% to the size of an optimized image. Only use it if you \
184-
believe the benefits outweigh the costs for your use case.")
185+
believe the benefits outweigh the costs for your use case.
186+
187+
[default: 0]")
185188
.short('i')
186189
.long("interlace")
187190
.value_name("type")
188-
.default_value("0")
189191
.value_parser(["0", "1", "keep"])
190192
.hide_possible_values(true),
191193
)

0 commit comments

Comments
 (0)