mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +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
|
||||
} else if (!strcmp(argv[c], "-v")) {
|
||||
verbose = 1;
|
||||
} else if (!strcmp(argv[c], "--")) {
|
||||
if (c < argc - 1) in_file = argv[++c];
|
||||
break;
|
||||
} else if (argv[c][0] == '-') {
|
||||
fprintf(stderr, "Error! Unknown option '%s'\n", argv[c]);
|
||||
HelpLong();
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH CWEBP 1 "October 23, 2013"
|
||||
.TH CWEBP 1 "December 12, 2013"
|
||||
.SH NAME
|
||||
cwebp \- compress an image file to a WebP file
|
||||
.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
|
||||
.br
|
||||
cwebp \-sns 70 \-f 50 \-size 60000 picture.png \-o picture.webp
|
||||
.br
|
||||
cwebp \-o picture.webp \-\- \-\-\-picture.png
|
||||
|
||||
.SH AUTHORS
|
||||
\fBcwebp\fP was written by the WebP team.
|
||||
|
Loading…
Reference in New Issue
Block a user