dwebp
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
名称
dwebp
- 将 WebP 文件解压缩为图片文件
摘要
dwebp [options] input_file.webp
说明
dwebp
会将 WebP 文件解压缩为 PNG、PAM、PPM 或 PGM 图片。
注意:不支持动画 WebP 文件。
选项
基本选项包括:
-h
- 输出使用情况摘要。
-version
- 输出版本号(采用 main.minor.revision 格式)并退出。
-o string
- 指定输出文件的名称(默认为 PNG 格式)。使用“-”
作为输出名称,会将输出定向到“stdout”。
-- string
- 明确指定输入文件。如果输入
文件以“-”开头例如此选项必须显示为
last
。
之后的任何其他选项都将被忽略。如果输入文件为“-”,
相应数据将从 stdin 而不是文件读取。
-bmp
- 将输出格式更改为未压缩的 BMP。
-tiff
- 将输出格式更改为未压缩的 TIFF。
-pam
- 将输出格式更改为 PAM(保留 Alpha 值)。
-ppm
- 将输出格式更改为 PPM(舍弃 Alpha 版)。
-pgm
- 将输出格式更改为 PGM。输出包含亮度/色度
样本而不是 RGB,同时使用 IMC4 布局。此选项主要用于
用于验证和调试目的。
-yuv
- 将输出格式更改为原始 YUV。输出包含
luma/chroma-U/chroma-V 样本而不是 RGB,按顺序保存为
单个平面。此选项主要用于验证和调试
目的。
-nofancy
- 不要为 YUV420 使用花哨的高档工具。这可能会导致边缘不明显
(尤其是红色的),但应该快一些。
-nofilter
- 即使
比特流这可能会针对不合规的输出产生可见块,
但会加快解码速度。
-dither strength
- 指定介于 0 到 100 之间的抖动强度。抖动是一种
对有损压缩中色度分量应用的后处理效果。
它有助于平滑梯度并避免条带伪影。
-nodither
- 停用所有抖动(默认)。
-mt
- 尽可能使用多线程解码。
-crop x_position y_position width height
- 将解码后的图片剪裁成一个矩形,并使左上角位于
坐标 (
x_position
, y_position
),尺寸为 width
x height
。这个
剪裁区域必须完全包含在源矩形内。通过
根据需要调整为偶数坐标。此选项
旨在减少剪裁大型图片所需的内存。注意:
在任何缩放之前应用剪裁。
-flip
- 垂直翻转解码的图片(对于
实例)。
-resize width height
- 将解码后的图片重新缩放至
width
x height
的尺寸。此选项
主要是为了减少解码大型图像所需的内存,
只需较小的版本(缩略图、预览等)。注意:扩缩
在剪裁之后应用。
如果 width
或 height
参数中任一(但不是两个)为 0
,
计算值时将保持宽高比不变。
-v
- 输出额外信息(特别是解码时间)。
-noasm
- 停用所有组装优化。
错误
示例
dwebp picture.webp -o output.png
dwebp picture.webp -ppm -o output.ppm
dwebp -o output.ppm -- ---picture.webp
cat picture.webp | dwebp -o - -- - > output.ppm
作者
dwebp
是 libwebp
的一部分,由 WebP 团队编写。
最新的源代码树位于
https://chromium.googlesource.com/webm/libwebp/
本手册页的作者为 Pascal Massimino pascal.massimino@gmail.com,
(可能被其他人使用)。
输出文件格式详情
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-08。"],[[["\u003cp\u003e\u003ccode\u003edwebp\u003c/code\u003e is a command-line tool used to decompress WebP image files into various formats like PNG, PAM, PPM, or PGM.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify output file names, formats, and utilize options such as cropping, resizing, dithering, and multi-threading for customized decompression.\u003c/p\u003e\n"],["\u003cp\u003eWhile it supports several output formats and advanced options, \u003ccode\u003edwebp\u003c/code\u003e currently doesn't handle animated WebP files.\u003c/p\u003e\n"],["\u003cp\u003eBasic usage involves specifying the input WebP file and optionally the desired output file name and format using provided options.\u003c/p\u003e\n"],["\u003cp\u003eFor detailed usage, bug reporting, or contributing to the project, refer to the provided links and documentation.\u003c/p\u003e\n"]]],["`dwebp` decompresses WebP files into various image formats like PNG, BMP, TIFF, PAM, PPM, or PGM. Key actions include specifying the input WebP file and output file name, choosing the output format, and using options to modify the decoding process. You can crop, resize, flip, or apply dithering, disable in-loop filtering, or use multi-threading. It supports reading from standard input and writing to standard output and is mainly for image verification.\n"],null,[]]