From b4fa0a47ea4b7276951c92e0fdb06a6174589236 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 17 Dec 2013 20:50:46 -0800 Subject: [PATCH] webpmux: let -- stop parameter parsing this enables webpmux to accept input files starting with '-' when using -get/-set/-strip; -info & -frame expect an input file as one of their parameters so no changes are necessary there. Change-Id: I154eb6dc388258a7fb743ec76ba869bf9589be1b --- examples/webpmux.c | 11 +++++++++++ man/webpmux.1 | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/examples/webpmux.c b/examples/webpmux.c index 852771be..a72efe3b 100644 --- a/examples/webpmux.c +++ b/examples/webpmux.c @@ -677,6 +677,17 @@ static int ParseCommandLine(int argc, const char* argv[], (version >> 16) & 0xff, (version >> 8) & 0xff, version & 0xff); DeleteConfig(config); exit(0); + } else if (!strcmp(argv[i], "--")) { + if (i < argc - 1) { + ++i; + if (config->input_ == NULL) { + config->input_ = argv[i]; + } else { + ERROR_GOTO2("ERROR at '%s': Multiple input files specified.\n", + argv[i], ErrParse); + } + } + break; } else { ERROR_GOTO2("ERROR: Unknown option: '%s'.\n", argv[i], ErrParse); } diff --git a/man/webpmux.1 b/man/webpmux.1 index 02d13a1c..a0b1a419 100644 --- a/man/webpmux.1 +++ b/man/webpmux.1 @@ -1,5 +1,5 @@ .\" Hey, EMACS: -*- nroff -*- -.TH WEBPMUX 1 "August 26, 2013" +.TH WEBPMUX 1 "December 17, 2013" .SH NAME webpmux \- command line tool to create WebP Mux/container file. .SH SYNOPSIS @@ -161,6 +161,12 @@ webpmux \-frame anim_1.webp +100 \-frame anim_2.webp +100+50+50 .RE .br webpmux \-get frame 2 anim_container.webp \-o frame_2.webp +.br +webpmux \-set icc image_profile.icc \-o icc_container.webp \-\- \-\-\-in.webp +.br +webpmux \-get icc \-o image_profile.icc \-\- \-\-\-icc_container.webp +.br +webpmux \-strip icc \-o without_icc.webp \-\- \-\-\-icc_container.webp .SH AUTHORS \fBwebpmux\fP is written by the WebP team.