翻译:
https://developers.google.com/speed/webp/
A new image format for the web
WebP 是一种先进的图片格式,它可以以更低的失真率来压缩网络图片。网络管理员和开发者可以通过使用 WebP 来创造体积更小、更丰富的图片,从而提高网络加载的速度,节省带宽。
WebP is a modern image format that provides superior lossless and lossy compression for images on the wb. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster.
同一张 WebP 无损图片对比 PNG 格式可以减少 26% 的体积。同结构质量等级的 WebP 有损图片和 JPEG 图片相比体积会减少 25-34%。
WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quaity index.
支持透明通道的无损 WebP 图片仅仅会比不支持透明通道的无损 WebP 增加 20% 的体积。同样有损 WebP 也支持透明通道,典型的有损 WebP 透明图片可以缩小3倍的体积。
Lossless WebP supports transparency (also known as alpha channel) at a cost of just 22% additional bytes. For cases when lossy RGB compression is acceptable, lossy WebP also supports transparency, typically providing 3x smaller file sizes compared to PNG.
有损 WebP 压缩通过预测编码法来编码图片,同样的方式也被使用在 VP8 的视频帧压缩。预测编码法会根据相邻像素块的色值来预测当前像素块的色值,同时只编码记录两者差别。
Lossy WebP compression uses predictive coding to encode an image, the same method used by the PV8 video codec to compress keyframes in videos. Predictive coding uses the values in neighboring blocks of pixels to predict the values in a block, and then encodes only the difference.
无损 WebP 压缩通过拆分图片来准确的重构新的像素,如果没有可用的匹配,压缩算法也会启用本地调色板。
Lossless WebP compression uses already seen image fragments in order to exactly reconstruct new pixels. It can also use a local palette if no interesting match is found.
Chrome 和 Opera 浏览器原生支持 WebP 图片格式,很多工具和软件库也支持 WebP 图片格式。开发者也已经将 WebP 兼容添加到多种图片编辑器工具。
WebP is natively supported in Google Chrome and the Opera browser, and by many other tools and software libraries. Developers have also added support to a variety of image editing tools.
WebP 拥有轻量级的编码解码库 libwebp,同时也拥有命令行工具 cwebp 和 dwebp 来完成编码解码 webp 格式的图片。全部源码可以到下载页下载。
WebP includes the lightweight encoding and decoding library libwebp and the command line tools cwebp and dwebp for converting images to and from the WebP format, as well as tools for viewing, muxing and animating WebP images. The full source code is available on the download page.
通过下载预编译好的 cwebp 转换工具,您可以将自己喜欢的 PNG JPEG 图片转换为 WebP 格式。
Convert your favorite collection from PNG and JPEG to WebP by downloading the precompiled cwebp conversion tool for Linux, Windows or Mac OS X.
**
**