allow some more stdin/stout I/O

* allow reading from stdin for dwebp / vwebp
 * allow writing to stdout for gif2webp

by introducing a new function ExUtilReadFromStdin()

Example use: cat in.webp | dwebp -o - -- - > out.png

Note that the '-- -' option must appear *last*
(as per general fashion for '--' option parsing)

Change-Id: I8df0f3a246cc325925d6b6f668ba060f7dd81d68
This commit is contained in:
skal
2014-03-12 19:32:16 +01:00
parent 84ed4b3aa5
commit 2bcad89b4c
6 changed files with 71 additions and 11 deletions

View File

@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
.TH DWEBP 1 "January 11, 2014"
.TH DWEBP 1 "March 7, 2014"
.SH NAME
dwebp \- decompress a WebP file to an image file
.SH SYNOPSIS
@ -25,6 +25,12 @@ Print the version number (as major.minor.revision) and exit.
Specify the name of the output file (as PNG format by default).
Using "-" as output name will direct output to 'stdout'.
.TP
.BI \-\- " string
Explicitly specify the input file. This option is useful if the input
file starts with an '\-' for instance. This option must appear \fBlast\fP.
Any other options afterward will be ignored. If the input file is "\-",
the data will be read from \fIstdin\fP instead of a file.
.TP
.B \-bmp
Change the output format to uncompressed BMP.
.TP
@ -104,6 +110,8 @@ dwebp picture.webp \-o output.png
dwebp picture.webp \-ppm \-o output.ppm
.br
dwebp \-o output.ppm \-\- \-\-\-picture.webp
.br
cat picture.webp | dwebp \-o \- \-\- \- > output.ppm
.SH AUTHORS
\fBdwebp\fP was written by the WebP team.