cwebp
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 (lossy compression, q = 75) to the [o]utput file:
cwebp -o .webp
- Compress a WebP file with the best lossy compression [q]uality and largest file size:
cwebp -o .webp -q
- Compress a WebP file with the worst lossy compression [q]uality and smallest file size:
cwebp -o .webp -q
- Compress a WebP file with lossless compression and smallest possible file size:
cwebp -o .webp -z 9
- Compress a WebP file and apply resize to image (if width or height are 0, scaling preserves aspect ratio):
cwebp -o .webp -resize
- Compress a WebP file and drop alpha channel information:
cwebp -o .webp -noalpha
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
