開始使用
圖片愛好者應使用
支援 WebP。
我們在 libwebp
轉碼器發布方案中提供參考用的
分別由編碼器和解碼器應用程式,分別設定 cwebp
和 dwebp
展示 WebP 可用的功能可下載這些檔案
從下載存放區
也能從原始碼建構它們位於 examples/
目錄中。
libwebp
轉碼器包含廣泛的編碼器和解碼器 API。請
如要新增對 WebP 的支援,請參閱相關說明文件
您的應用程式或瀏覽器
在指令列中使用 cwebp
,將 PNG 或 JPEG 圖片檔轉換為 WebP
格式。您可以將 PNG 圖片檔轉換為品質範圍的 WebP 圖片
輸入 80:
cwebp -q 80 image.png -o image.webp
如需相關說明,請參閱 cwebp
說明文件
以及標準和進階選項
在指令列中使用 dwebp
將 WebP 圖片檔轉換為 PNG 或 PPM
格式。你可以將 WebP 圖片檔 (例如 image.webp
) 轉換為 PNG 圖片
執行下列指令:
dwebp image.webp -o image.png
如需相關說明,請參閱 dwebp
說明文件
及其指令列選項
以原生方式檢視圖片
WebP 是一種新的圖片格式,並由 Google Chrome、Opera、
和其他許多
應用程式和程式庫
WebP 轉碼器適用的 API
WebP 團隊提供廣泛的 API,可讓開發人員在
為自家應用程式提供支援,包括瀏覽器、圖片編輯工具
如同原生應用程式
如需
libwebp
應用程式設計介面。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-20 (世界標準時間)。
[null,null,["上次更新時間:2024-09-20 (世界標準時間)。"],[[["WebP is a modern image format supported by various software and browsers like Google Chrome and Opera."],["The `libwebp` codec provides tools like `cwebp` and `dwebp` for encoding and decoding WebP images respectively."],["Users can leverage command-line tools or the comprehensive API to integrate WebP functionality into their applications."],["Detailed documentation for the encoder, decoder, and API is available for developers to utilize."]]],["Image conversion to and from WebP format is facilitated by `cwebp` (encoder) and `dwebp` (decoder) applications, available via download or source build. `cwebp` converts PNG or JPEG to WebP (e.g., `cwebp -q 80 image.png -o image.webp`), while `dwebp` converts WebP to PNG or PPM (e.g., `dwebp image.webp -o image.png`). Developers can integrate WebP support into applications using the provided `libwebp` API. WebP is natively supported by browsers like Chrome and Opera.\n"]]