Add descriptions of default configuration in help info.

Change-Id: I43188fab5f57bd45aa3e564df52e36cc37b1bb2f
(cherry picked from commit 74f6f9e793)
This commit is contained in:
Hui Su 2016-08-09 17:03:55 +00:00 committed by James Zern
parent 7416280d75
commit 26ffa2962b
3 changed files with 34 additions and 26 deletions

23
README
View File

@ -220,8 +220,9 @@ assumed to be a PNG, JPEG, TIFF or WebP file.
Options: Options:
-h / -help ............. short help -h / -help ............. short help
-H / -longhelp ......... long help -H / -longhelp ......... long help
-q <float> ............. quality factor (0:small..100:big) -q <float> ............. quality factor (0:small..100:big), default=75
-alpha_q <int> ......... transparency-compression quality (0..100) -alpha_q <int> ......... transparency-compression quality (0..100),
default=100
-preset <string> ....... preset setting, one of: -preset <string> ....... preset setting, one of:
default, photo, picture, default, photo, picture,
drawing, icon, text drawing, icon, text
@ -229,15 +230,15 @@ Options:
-z <int> ............... activates lossless preset with given -z <int> ............... activates lossless preset with given
level in [0:fast, ..., 9:slowest] level in [0:fast, ..., 9:slowest]
-m <int> ............... compression method (0=fast, 6=slowest) -m <int> ............... compression method (0=fast, 6=slowest), default=4
-segments <int> ........ number of segments to use (1..4) -segments <int> ........ number of segments to use (1..4), default=4
-size <int> ............ target size (in bytes) -size <int> ............ target size (in bytes)
-psnr <float> .......... target PSNR (in dB. typically: 42) -psnr <float> .......... target PSNR (in dB. typically: 42)
-s <int> <int> ......... input size (width x height) for YUV -s <int> <int> ......... input size (width x height) for YUV
-sns <int> ............. spatial noise shaping (0:off, 100:max) -sns <int> ............. spatial noise shaping (0:off, 100:max), default=50
-f <int> ............... filter strength (0=off..100) -f <int> ............... filter strength (0=off..100), default=60
-sharpness <int> ....... filter sharpness (0:most .. 7:least sharp) -sharpness <int> ....... filter sharpness (0:most .. 7:least sharp), default=0
-strong ................ use strong filter instead of simple (default) -strong ................ use strong filter instead of simple (default)
-nostrong .............. use simple filter instead of strong -nostrong .............. use simple filter instead of strong
-partition_limit <int> . limit quality to fit the 512k limit on -partition_limit <int> . limit quality to fit the 512k limit on
@ -252,18 +253,18 @@ Options:
-print_ssim ............ prints averaged SSIM distortion -print_ssim ............ prints averaged SSIM distortion
-print_lsim ............ prints local-similarity distortion -print_lsim ............ prints local-similarity distortion
-d <file.pgm> .......... dump the compressed output (PGM file) -d <file.pgm> .......... dump the compressed output (PGM file)
-alpha_method <int> .... transparency-compression method (0..1) -alpha_method <int> .... transparency-compression method (0..1), default=1
-alpha_filter <string> . predictive filtering for alpha plane, -alpha_filter <string> . predictive filtering for alpha plane,
one of: none, fast (default) or best one of: none, fast (default) or best
-exact ................. preserve RGB values in transparent area -exact ................. preserve RGB values in transparent area, default=off
-blend_alpha <hex> ..... blend colors against background color -blend_alpha <hex> ..... blend colors against background color
expressed as RGB values written in expressed as RGB values written in
hexadecimal, e.g. 0xc0e0d0 for red=0xc0 hexadecimal, e.g. 0xc0e0d0 for red=0xc0
green=0xe0 and blue=0xd0 green=0xe0 and blue=0xd0
-noalpha ............... discard any transparency information -noalpha ............... discard any transparency information
-lossless .............. encode image losslessly -lossless .............. encode image losslessly, default=off
-near_lossless <int> ... use near-lossless image -near_lossless <int> ... use near-lossless image
preprocessing (0..100=off) preprocessing (0..100=off), default=100
-hint <string> ......... specify image characteristics hint, -hint <string> ......... specify image characteristics hint,
one of: photo, picture or graph one of: photo, picture or graph

View File

@ -516,9 +516,10 @@ static void HelpLong(void) {
printf("\nOptions:\n"); printf("\nOptions:\n");
printf(" -h / -help ............. short help\n"); printf(" -h / -help ............. short help\n");
printf(" -H / -longhelp ......... long help\n"); printf(" -H / -longhelp ......... long help\n");
printf(" -q <float> ............. quality factor (0:small..100:big)\n"); printf(" -q <float> ............. quality factor (0:small..100:big), "
printf(" -alpha_q <int> ......... transparency-compression quality " "default=75\n");
"(0..100)\n"); printf(" -alpha_q <int> ......... transparency-compression quality (0..100),"
"\n default=100\n");
printf(" -preset <string> ....... preset setting, one of:\n"); printf(" -preset <string> ....... preset setting, one of:\n");
printf(" default, photo, picture,\n"); printf(" default, photo, picture,\n");
printf(" drawing, icon, text\n"); printf(" drawing, icon, text\n");
@ -526,16 +527,20 @@ static void HelpLong(void) {
printf(" -z <int> ............... activates lossless preset with given\n" printf(" -z <int> ............... activates lossless preset with given\n"
" level in [0:fast, ..., 9:slowest]\n"); " level in [0:fast, ..., 9:slowest]\n");
printf("\n"); printf("\n");
printf(" -m <int> ............... compression method (0=fast, 6=slowest)\n"); printf(" -m <int> ............... compression method (0=fast, 6=slowest), "
printf(" -segments <int> ........ number of segments to use (1..4)\n"); "default=4\n");
printf(" -segments <int> ........ number of segments to use (1..4), "
"default=4\n");
printf(" -size <int> ............ target size (in bytes)\n"); printf(" -size <int> ............ target size (in bytes)\n");
printf(" -psnr <float> .......... target PSNR (in dB. typically: 42)\n"); printf(" -psnr <float> .......... target PSNR (in dB. typically: 42)\n");
printf("\n"); printf("\n");
printf(" -s <int> <int> ......... input size (width x height) for YUV\n"); printf(" -s <int> <int> ......... input size (width x height) for YUV\n");
printf(" -sns <int> ............. spatial noise shaping (0:off, 100:max)\n"); printf(" -sns <int> ............. spatial noise shaping (0:off, 100:max), "
printf(" -f <int> ............... filter strength (0=off..100)\n"); "default=50\n");
printf(" -f <int> ............... filter strength (0=off..100), "
"default=60\n");
printf(" -sharpness <int> ....... " printf(" -sharpness <int> ....... "
"filter sharpness (0:most .. 7:least sharp)\n"); "filter sharpness (0:most .. 7:least sharp), default=0\n");
printf(" -strong ................ use strong filter instead " printf(" -strong ................ use strong filter instead "
"of simple (default)\n"); "of simple (default)\n");
printf(" -nostrong .............. use simple filter instead of strong\n"); printf(" -nostrong .............. use simple filter instead of strong\n");
@ -552,19 +557,21 @@ static void HelpLong(void) {
printf(" -print_ssim ............ prints averaged SSIM distortion\n"); printf(" -print_ssim ............ prints averaged SSIM distortion\n");
printf(" -print_lsim ............ prints local-similarity distortion\n"); printf(" -print_lsim ............ prints local-similarity distortion\n");
printf(" -d <file.pgm> .......... dump the compressed output (PGM file)\n"); printf(" -d <file.pgm> .......... dump the compressed output (PGM file)\n");
printf(" -alpha_method <int> .... transparency-compression method (0..1)\n"); printf(" -alpha_method <int> .... transparency-compression method (0..1), "
"default=1\n");
printf(" -alpha_filter <string> . predictive filtering for alpha plane,\n"); printf(" -alpha_filter <string> . predictive filtering for alpha plane,\n");
printf(" one of: none, fast (default) or best\n"); printf(" one of: none, fast (default) or best\n");
printf(" -exact ................. preserve RGB values in transparent area" printf(" -exact ................. preserve RGB values in transparent area, "
"\n"); "default=off\n");
printf(" -blend_alpha <hex> ..... blend colors against background color\n" printf(" -blend_alpha <hex> ..... blend colors against background color\n"
" expressed as RGB values written in\n" " expressed as RGB values written in\n"
" hexadecimal, e.g. 0xc0e0d0 for red=0xc0\n" " hexadecimal, e.g. 0xc0e0d0 for red=0xc0\n"
" green=0xe0 and blue=0xd0\n"); " green=0xe0 and blue=0xd0\n");
printf(" -noalpha ............... discard any transparency information\n"); printf(" -noalpha ............... discard any transparency information\n");
printf(" -lossless .............. encode image losslessly\n"); printf(" -lossless .............. encode image losslessly, default=off\n");
printf(" -near_lossless <int> ... use near-lossless image\n" printf(" -near_lossless <int> ... use near-lossless image\n"
" preprocessing (0..100=off)\n"); " preprocessing (0..100=off), "
"default=100\n");
#ifdef WEBP_EXPERIMENTAL_FEATURES #ifdef WEBP_EXPERIMENTAL_FEATURES
printf(" -delta_palettization ... use delta palettization\n"); printf(" -delta_palettization ... use delta palettization\n");
#endif // WEBP_EXPERIMENTAL_FEATURES #endif // WEBP_EXPERIMENTAL_FEATURES

View File

@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*- .\" Hey, EMACS: -*- nroff -*-
.TH CWEBP 1 "June 23, 2016" .TH CWEBP 1 "August 05, 2016"
.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
@ -171,7 +171,7 @@ Specify the amplitude of the spatial noise shaping. Spatial noise shaping
(or \fBsns\fP for short) refers to a general collection of built\-in algorithms (or \fBsns\fP for short) refers to a general collection of built\-in algorithms
used to decide which area of the picture should use relatively less bits, used to decide which area of the picture should use relatively less bits,
and where else to better transfer these bits. The possible range goes from and where else to better transfer these bits. The possible range goes from
0 (algorithm is off) to 100 (the maximal effect). The default value is 80. 0 (algorithm is off) to 100 (the maximal effect). The default value is 50.
.TP .TP
.BI \-segments " int .BI \-segments " int
Change the number of partitions to use during the segmentation of the Change the number of partitions to use during the segmentation of the