mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 19:38:56 +08:00
cwebp: add lossless compression example (#21356)
This commit is contained in:
@@ -3,19 +3,23 @@
|
||||
> Compress an image file to a WebP file.
|
||||
> More information: <https://developers.google.com/speed/webp/docs/cwebp>.
|
||||
|
||||
- Compress a WebP file with default settings (q = 75) to the [o]utput file:
|
||||
- Compress a WebP file with default settings (lossy compression, q = 75) to the [o]utput file:
|
||||
|
||||
`cwebp {{path/to/image_file}} -o {{path/to/output.webp}}`
|
||||
|
||||
- Compress a WebP file with the best [q]uality and largest file size:
|
||||
- Compress a WebP file with the best lossy compression [q]uality and largest file size:
|
||||
|
||||
`cwebp {{path/to/image_file}} -o {{path/to/output.webp}} -q {{100}}`
|
||||
|
||||
- Compress a WebP file with the worst [q]uality and smallest file size:
|
||||
- Compress a WebP file with the worst lossy compression [q]uality and smallest file size:
|
||||
|
||||
`cwebp {{path/to/image_file}} -o {{path/to/output.webp}} -q {{0}}`
|
||||
|
||||
- Compress a WebP file and apply resize to image:
|
||||
- Compress a WebP file with lossless compression and smallest possible file size:
|
||||
|
||||
`cwebp {{path/to/image_file}} -o {{path/to/output.webp}} -z 9`
|
||||
|
||||
- Compress a WebP file and apply resize to image (if width or height are 0, scaling preserves aspect ratio):
|
||||
|
||||
`cwebp {{path/to/image_file}} -o {{path/to/output.webp}} -resize {{width}} {{height}}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user