1. Usage:
  2. cwebp [-preset <...>] [options] in_file [-o out_file]
  3. If input size (-s) for an image is not specified, it is
  4. assumed to be a PNG, JPEG, TIFF or WebP file.
  5. Windows builds can take as input any of the files handled by WIC.
  6. Options:
  7. -h / -help ............ short help
  8. -H / -longhelp ........ long help
  9. -q <float> ............. quality factor (0:small..100:big)
  10. -alpha_q <int> ......... transparency-compression quality (0..100)
  11. -preset <string> ....... preset setting, one of:
  12. default, photo, picture,
  13. drawing, icon, text
  14. -preset must come first, as it overwrites other parameters
  15. -z <int> ............... activates lossless preset with given
  16. level in [0:fast, ..., 9:slowest]
  17. -m <int> ............... compression method (0=fast, 6=slowest)
  18. -segments <int> ........ number of segments to use (1..4)
  19. -size <int> ............ target size (in bytes)
  20. -psnr <float> .......... target PSNR (in dB. typically: 42)
  21. -s <int> <int> ......... input size (width x height) for YUV
  22. -sns <int> ............. spatial noise shaping (0:off, 100:max)
  23. -f <int> ............... filter strength (0=off..100)
  24. -sharpness <int> ....... filter sharpness (0:most .. 7:least sharp)
  25. -strong ................ use strong filter instead of simple (default)
  26. -nostrong .............. use simple filter instead of strong
  27. -partition_limit <int> . limit quality to fit the 512k limit on
  28. the first partition (0=no degradation ... 100=full)
  29. -pass <int> ............ analysis pass number (1..10)
  30. -crop <x> <y> <w> <h> .. crop picture with the given rectangle
  31. -resize <w> <h> ........ resize picture (after any cropping)
  32. -mt .................... use multi-threading if available
  33. -low_memory ............ reduce memory usage (slower encoding)
  34. -map <int> ............. print map of extra info
  35. -print_psnr ............ prints averaged PSNR distortion
  36. -print_ssim ............ prints averaged SSIM distortion
  37. -print_lsim ............ prints local-similarity distortion
  38. -d <file.pgm> .......... dump the compressed output (PGM file)
  39. -alpha_method <int> .... transparency-compression method (0..1)
  40. -alpha_filter <string> . predictive filtering for alpha plane,
  41. one of: none, fast (default) or best
  42. -exact ................. preserve RGB values in transparent area
  43. -blend_alpha <hex> ..... blend colors against background color
  44. expressed as RGB values written in
  45. hexadecimal, e.g. 0xc0e0d0 for red=0xc0
  46. green=0xe0 and blue=0xd0
  47. -noalpha ............... discard any transparency information
  48. -lossless .............. encode image losslessly
  49. -near_lossless <int> ... use near-lossless image
  50. preprocessing (0..100=off)
  51. -hint <string> ......... specify image characteristics hint,
  52. one of: photo, picture or graph
  53. -metadata <string> ..... comma separated list of metadata to
  54. copy from the input to the output if present.
  55. Valid values: all, none (default), exif, icc, xmp
  56. -short ................. condense printed message
  57. -quiet ................. don't print anything
  58. -version ............... print version number and exit
  59. -noasm ................. disable all assembly optimizations
  60. -v ..................... verbose, e.g. print encoding/decoding times
  61. -progress .............. report encoding progress
  62. Experimental Options:
  63. -jpeg_like ............. roughly match expected JPEG size
  64. -af .................... auto-adjust filter strength
  65. -pre <int> ............. pre-processing filter