mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
cwebp: let -- stop parameter parsing
this enables cwebp to accept input files starting with '-' Change-Id: I13b506886c3df8a4e8fb350f3d365eaf7e072a4a
This commit is contained in:
parent
a33831e21a
commit
98af68fe26
@ -895,6 +895,9 @@ int main(int argc, const char *argv[]) {
|
|||||||
#endif
|
#endif
|
||||||
} else if (!strcmp(argv[c], "-v")) {
|
} else if (!strcmp(argv[c], "-v")) {
|
||||||
verbose = 1;
|
verbose = 1;
|
||||||
|
} else if (!strcmp(argv[c], "--")) {
|
||||||
|
if (c < argc - 1) in_file = argv[++c];
|
||||||
|
break;
|
||||||
} else if (argv[c][0] == '-') {
|
} else if (argv[c][0] == '-') {
|
||||||
fprintf(stderr, "Error! Unknown option '%s'\n", argv[c]);
|
fprintf(stderr, "Error! Unknown option '%s'\n", argv[c]);
|
||||||
HelpLong();
|
HelpLong();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH CWEBP 1 "October 23, 2013"
|
.TH CWEBP 1 "December 12, 2013"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
cwebp \- compress an image file to a WebP file
|
cwebp \- compress an image file to a WebP file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -255,6 +255,8 @@ cwebp \-q 50 -lossless picture.png \-o picture_lossless.webp
|
|||||||
cwebp \-q 70 picture_with_alpha.png \-o picture_with_alpha.webp
|
cwebp \-q 70 picture_with_alpha.png \-o picture_with_alpha.webp
|
||||||
.br
|
.br
|
||||||
cwebp \-sns 70 \-f 50 \-size 60000 picture.png \-o picture.webp
|
cwebp \-sns 70 \-f 50 \-size 60000 picture.png \-o picture.webp
|
||||||
|
.br
|
||||||
|
cwebp \-o picture.webp \-\- \-\-\-picture.png
|
||||||
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
\fBcwebp\fP was written by the WebP team.
|
\fBcwebp\fP was written by the WebP team.
|
||||||
|
Loading…
Reference in New Issue
Block a user