dwebp
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tên
dwebp
– Giải nén tệp WebP thành tệp hình ảnh
Tóm tắt phim
dwebp [options] input_file.webp
Mô tả
dwebp
giải nén tệp WebP thành hình ảnh PNG, PAM, PPM hoặc PGM.
Lưu ý: Tệp WebP động không được hỗ trợ.
Tùy chọn
Các tuỳ chọn cơ bản là:
-h
- Tóm tắt mức sử dụng bản in.
-version
- In số phiên bản (dưới dạng main.minor.revision) rồi thoát.
-o string
- Chỉ định tên của tệp đầu ra (ở định dạng PNG theo mặc định). Sử dụng "-"
làm tên đầu ra sẽ chuyển đầu ra tới "stdout".
-- string
- Chỉ định rõ tệp đầu vào. Tuỳ chọn này rất hữu ích nếu dữ liệu đầu vào
tệp bắt đầu bằng '-' chẳng hạn. Lựa chọn này phải xuất hiện
last
.
Sau đó, mọi tuỳ chọn khác sẽ bị bỏ qua. Nếu tệp nhập là "-",
dữ liệu sẽ được đọc từ stdin thay vì từ tệp.
-bmp
- Thay đổi định dạng đầu ra thành BMP không nén.
-tiff
- Thay đổi định dạng đầu ra thành định dạng TIFF không nén.
-pam
- Thay đổi định dạng đầu ra thành PAM (giữ lại alpha).
-ppm
- Thay đổi định dạng đầu ra thành PPM (huỷ bỏ bản alpha).
-pgm
- Thay đổi định dạng đầu ra thành PGM. Đầu ra bao gồm độ sáng/sắc độ
mẫu thay vì RGB, sử dụng bố cục IMC4. Lựa chọn này chủ yếu dành cho
mục đích xác minh và gỡ lỗi.
-yuv
- Thay đổi định dạng đầu ra thành YUV thô. Dữ liệu đầu ra bao gồm
các mẫu luma/chroma-U/chroma-V thay vì RGB, được lưu tuần tự dưới dạng
máy bay riêng lẻ. Chế độ này chủ yếu dùng để xác minh và gỡ lỗi
cho mục đích khác.
-nofancy
- Không sử dụng trình tăng cấp thích hợp cho YUV420. Điều này có thể khiến các cạnh lởm chởm
(đặc biệt là những thẻ màu đỏ), nhưng sẽ nhanh hơn.
-nofilter
- Không sử dụng quy trình lọc trong vòng ngay cả khi
luồng bit. Việc này có thể khiến dữ liệu bị chặn
có thể nhìn thấy được trên đầu ra không tuân thủ.
nhưng sẽ giúp quá trình giải mã nhanh hơn.
-dither strength
- Chỉ định cường độ phối màu trong khoảng từ 0 đến 100. Phối màu
hiệu ứng hậu xử lý áp dụng cho các thành phần sắc độ khi nén có tổn hao.
Cách này giúp làm mượt các hiệu ứng chuyển màu và tránh các hiệu ứng tạo dải màu.
-nodither
- Tắt tất cả tính năng phối màu (mặc định).
-mt
- Nếu có thể, hãy sử dụng phương pháp đa luồng để giải mã.
-crop x_position y_position width height
- Cắt ảnh đã giải mã thành một hình chữ nhật có góc trên cùng bên trái tại
toạ độ (
x_position
, y_position
) và kích thước width
x height
. Chiến dịch này
vùng cắt phải nằm hoàn toàn trong hình chữ nhật nguồn. Chiến lược phát hành đĩa đơn
góc trên cùng bên trái sẽ được điều chỉnh theo toạ độ bằng nhau nếu cần. Lựa chọn này
nhằm giảm bộ nhớ cần thiết để cắt các hình ảnh lớn. Lưu ý:
được áp dụng trước khi chuyển tỷ lệ.
-flip
- Lật hình ảnh được giải mã theo chiều dọc (có thể hữu ích cho hoạ tiết OpenGL cho
thực thể).
-resize width height
- Điều chỉnh tỷ lệ của hình ảnh đã giải mã theo kích thước
width
x height
. Lựa chọn này là
chủ yếu là nhằm giảm bộ nhớ cần thiết để giải mã các hình ảnh lớn, khi
chỉ cần một phiên bản nhỏ (hình thu nhỏ, bản xem trước, v.v.). Lưu ý: điều chỉnh theo tỷ lệ
sẽ được áp dụng sau khi cắt.
Nếu một trong (nhưng không phải cả hai) của tham số width
hoặc height
là 0
,
giá trị sẽ được tính toán để duy trì tỷ lệ khung hình.
-v
- In thêm thông tin (cụ thể là thời gian giải mã).
-noasm
- Tắt tất cả tính năng tối ưu hoá tập hợp.
Lỗi
Ví dụ
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
Tác giả
dwebp
là một phần của libwebp
và do nhóm WebP viết.
Cây nguồn mới nhất hiện có tại
https://chromium.googlesource.com/webm/libwebp/
Trang hướng dẫn sử dụng này được viết bởi Pascal Massimino pascal.massimino@gmail.com,
dành cho dự án Debian (và có thể được sử dụng bởi những người khác).
Thông tin chi tiết về định dạng tệp đầu ra
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-08 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-08 UTC."],[[["\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"]]