dwebp
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
名稱
dwebp
:將 WebP 檔案解壓縮為圖片檔
Synopsis
dwebp [options] input_file.webp
說明
dwebp
會將 WebP 檔案解壓縮為 PNG、PAM、PPM 或 PGM 圖片。
注意:系統不支援動畫 WebP 檔案。
選項
基本選項包括:
-h
- 列印使用摘要。
-version
- 顯示版本號碼 (以 primary.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
- 垂直翻轉已解碼的圖片 (適用於 OpenGL 紋理的
執行個體)。
-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 撰寫。
供 Debian 專案使用 (其他人員可能會使用)。
輸出檔案格式詳細資料
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-08 (世界標準時間)。
[null,null,["上次更新時間: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,["# dwebp\n\nName\n----\n\n`dwebp` -- Decompress a WebP file to an image file\n\nSynopsis\n--------\n\n`dwebp [options] input_file.webp`\n\nDescription\n-----------\n\n`dwebp` decompresses WebP files into PNG, PAM, PPM or PGM images.\nNote: Animated WebP files are not supported.\n\nOptions\n-------\n\nThe basic options are:\n\n`-h`\n: Print usage summary.\n\n`-version`\n: Print the version number (as major.minor.revision) and exit.\n\n`-o string`\n: Specify the name of the output file (as PNG format by default). Using \"-\"\n as output name will direct output to 'stdout'.\n\n`-- string`\n: Explicitly specify the input file. This option is useful if the input\n file starts with an '-' for instance. This option must appear `last`.\n Any other options afterward will be ignored. If the input file is \"-\",\n the data will be read from stdin instead of a file.\n\n`-bmp`\n: Change the output format to uncompressed BMP.\n\n`-tiff`\n: Change the output format to uncompressed TIFF.\n\n`-pam`\n: Change the output format to PAM (retains alpha).\n\n`-ppm`\n: Change the output format to PPM (discards alpha).\n\n`-pgm`\n: Change the output format to PGM. The output consists of luma/chroma\n samples instead of RGB, using the IMC4 layout. This option is mainly for\n verification and debugging purposes.\n\n`-yuv`\n: Change the output format to raw YUV. The output consists of\n luma/chroma-U/chroma-V samples instead of RGB, saved sequentially as\n individual planes. This option is mainly for verification and debugging\n purposes.\n\n`-nofancy`\n: Don't use the fancy upscaler for YUV420. This may lead to jaggy edges\n (especially the red ones), but should be faster.\n\n`-nofilter`\n: Don't use the in-loop filtering process even if it is required by the\n bitstream. This may produce visible blocks on the non-compliant output,\n but it will make the decoding faster.\n\n`-dither strength`\n: Specify a dithering strength between 0 and 100. Dithering is a\n post-processing effect applied to chroma components in lossy compression.\n It helps by smoothing gradients and avoiding banding artifacts.\n\n`-nodither`\n: Disable all dithering (default).\n\n`-mt`\n: Use multi-threading for decoding, if possible.\n\n`-crop x_position y_position width height`\n: Crop the decoded picture to a rectangle with top-left corner at\n coordinates (`x_position`, `y_position`) and size `width` x `height`. This\n cropping area must be fully contained within the source rectangle. The\n top-left corner will be snapped to even coordinates if needed. This option\n is meant to reduce the memory needed for cropping large images. Note: the\n cropping is applied *before* any scaling.\n\n`-flip`\n: Flip decoded image vertically (can be useful for OpenGL textures for\n instance).\n\n`-resize width height`\n: Rescale the decoded picture to dimension `width` x `height`. This option is\n mostly intended to reducing the memory needed to decode large images, when\n only a small version is needed (thumbnail, preview, etc.). Note: scaling\n is applied *after* cropping.\n If either (but not both) of the `width` or `height` parameters is `0`,\n the value will be calculated preserving the aspect-ratio.\n\n`-v`\n: Print extra information (decoding time in particular).\n\n`-noasm`\n: Disable all assembly optimizations.\n\nBugs\n----\n\n- Please report all bugs to our issue tracker: \u003chttps://issues.webmproject.org\u003e\n\n- Patches welcome! See this page to get started: \u003chttps://www.webmproject.org/code/contribute/submitting-patches/\u003e\n\nExamples\n--------\n\n dwebp picture.webp -o output.png\n dwebp picture.webp -ppm -o output.ppm\n dwebp -o output.ppm -- ---picture.webp\n cat picture.webp | dwebp -o - -- - \u003e output.ppm\n\nAuthors\n-------\n\n`dwebp` is part of `libwebp`, and was written by the WebP team.\nThe latest source tree is available at\n\u003chttps://chromium.googlesource.com/webm/libwebp/\u003e\n\nThis manual page was written by Pascal Massimino [pascal.massimino@gmail.com](mailto:pascal.massimino@gmail.com),\nfor the Debian project (and may be used by others).\n\n**Output file format details**\n\n- PAM: \u003chttp://netpbm.sourceforge.net/doc/pam.html\u003e\n- PGM: \u003chttp://netpbm.sourceforge.net/doc/pgm.html\u003e\n- PPM: \u003chttp://netpbm.sourceforge.net/doc/ppm.html\u003e\n- PNG: \u003chttp://www.libpng.org/pub/png/png-sitemap.html#info\u003e"]]