Updated cwebp man's help for Alpha & Lossless.

Change-Id: Iaa129685fdbd95c3b408c92c77532b321bc2637f
This commit is contained in:
Vikas Arora 2012-07-04 12:51:14 +05:30
parent 16c46e83ac
commit eb6f9b8a72

View File

@ -12,9 +12,7 @@ This manual page documents the
command. command.
.PP .PP
\fBcwebp\fP compresses an image using the WebP format. \fBcwebp\fP compresses an image using the WebP format.
Input format can be either PNG, JPEG, or raw Y'CbCr samples. Input format can be either PNG, JPEG, TIFF or raw Y'CbCr samples.
When using PNG, the transparency information (alpha channel) is currently
discarded.
.SH OPTIONS .SH OPTIONS
The basic options are: The basic options are:
.TP .TP
@ -41,14 +39,6 @@ Specify the compression factor for alpha compression between 0 and 100.
Lossless compression of alpha is achieved using a value of 100, while the lower Lossless compression of alpha is achieved using a value of 100, while the lower
values result in a lossy compression. The default is 100. values result in a lossy compression. The default is 100.
.TP .TP
.B \-alpha_filter string
Specify the predictive filtering method for alpha plane. One of 'none', 'fast'
or 'best', in increasing complexity and slowness order. Default is 'fast'.
Internally, alpha filtering is performed using four possible predictions (none,
horizontal, vertical, gradient). The 'best' mode will try each modes in turn and
pick the one which gives the smaller size. The 'fast' mode will just try to
form an a-priori guess without testing all modes.
.TP
.B \-f int .B \-f int
Specify the strength of the deblocking filter, between 0 (no filtering) Specify the strength of the deblocking filter, between 0 (no filtering)
and 100 (maximum filtering). A value of 0 will turn off any filtering. and 100 (maximum filtering). A value of 0 will turn off any filtering.
@ -129,7 +119,7 @@ Compressor will make several pass of partial encoding in order to get as
close as possible to this target. close as possible to this target.
.TP .TP
.B \-pass int .B \-pass int
Set a maximum number of pass to use during the dichotomy used by Set a maximum number of passes to use during the dichotomy used by
options \fB\-size\fP or \fB\-psnr\fP. Maximum value is 10. options \fB\-size\fP or \fB\-psnr\fP. Maximum value is 10.
.TP .TP
.B \-crop x_position y_position width height .B \-crop x_position y_position width height
@ -150,10 +140,17 @@ range from 1 to 6. This is only meant to help debugging.
Specify a pre-processing filter. This option is a placeholder Specify a pre-processing filter. This option is a placeholder
and has currently no effect. and has currently no effect.
.TP .TP
.B \-alpha_filter string
Specify the predictive filtering method for alpha plane. One of 'none', 'fast'
or 'best', in increasing complexity and slowness order. Default is 'fast'.
Internally, alpha filtering is performed using four possible predictions (none,
horizontal, vertical, gradient). The 'best' mode will try each modes in turn and
pick the one which gives the smaller size. The 'fast' mode will just try to
form an a-priori guess without testing all modes.
.TP
.B \-alpha_method int .B \-alpha_method int
Specify the algorithm used for alpha compression: 0 or 1. Algorithm 0 denotes Specify the algorithm used for alpha compression: 0 or 1. Algorithm 0 denotes
no compression, 1 uses uses backward reference counts encoded with arithmetic no compression, 1 uses WebP lossless format for compression. The default is 1.
encoder. The default is 1.
.TP .TP
.B \-alpha_cleanup .B \-alpha_cleanup
Modify unseen RGB values under fully transparent area, to help compressibility. Modify unseen RGB values under fully transparent area, to help compressibility.
@ -198,7 +195,9 @@ Patches welcome! See this page to get started:
http://www.webmproject.org/code/contribute/submitting-patches/ http://www.webmproject.org/code/contribute/submitting-patches/
.SH EXAMPLES .SH EXAMPLES
cwebp \-q 70 picture.png \-o picture.webp cwebp \-q 50 -lossless picture.png \-o picture_lossless.webp
.br
cwebp \-q 70 picture_with_alpha.png \-o picture_with_alpha.webp
.br .br
cwebp \-sns 70 \-f 50 \-strong \-af \-size 60000 picture.png \-o picture.webp cwebp \-sns 70 \-f 50 \-strong \-af \-size 60000 picture.png \-o picture.webp