跳转到内容

WebP

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由InternetArchiveBot留言 | 贡献2021年2月9日 (二) 17:39 (补救17个来源,并将0个来源标记为失效。) #IABot (v2.0.8)编辑。这可能和当前版本存在着巨大的差异。

WebP
扩展名
.webp[1]
互联网媒体类型
image/webp
首次发布2010年9月30日 (2010-09-30)[2]
最新版本
1.2.0
2021年1月30日,​3年前​(2021-01-30[3]
使用容器資源交換檔案格式(RIFF)[4]
免费格式?[5]
网站developers.google.com/speed/webp/

WebP(發音:weppy[6][7])是一種同時提供了有損壓縮無損壓縮(可逆壓縮)的圖片檔案格式[8],衍生自影像編碼格式VP8[9],被認為是WebM多媒體格式的姊妹項目,是由Google在購買On2 Technologies後發展出來[10],以BSD授權條款釋出。[11]

WebP最初在2010年釋出,目標是減少檔案大小,但達到和JPEG格式相同的圖片品質,希望能夠減少圖片檔在網路上的傳送時間。[12]2011年11月8日,Google開始讓WebP支援無損壓縮和透明色(alpha通道)的功能,而在2012年8月16日的參考實做libwebp 0.2.0中正式支援[13][14]。根據Google較早的測試,WebP的無損壓縮比網路上找到的PNG檔少了45%的檔案大小,即使這些PNG檔在使用pngcrushPNGOUT處理過,WebP還是可以減少28%的檔案大小[15]

WebP支援的像素最大數量是16383x16383。有損壓縮的WebP僅支援8-bit的YUV 4:2:0格式。而無損壓縮(可逆壓縮)的WebP支援VP8L編碼與8-bit之ARGB色彩空間。又無論是有損或無損壓縮皆支援Alpha透明通道、ICC色彩配置、XMP詮釋資料。

WebP有靜態與動態兩種模式。動態WebP(Animated WebP)支援有損與無損壓縮、ICC色彩配置、XMP詮釋資料、Alpha透明通道。

技術

简单WebP
内容
 0- 3 R I F F
 4- 7 length+8
 8-11 W E B P
12-15 V P 8 [16]
16-19 length (padded)
20- … VP8关键帧
pad (even length)

WebP的有损压缩算法是基于VP8视频格式的帧内编码英语Intra-frame coding[17],并以RIFF作为容器格式[2] 因此,它是一个具有八位色彩深度和以1:2的比例进行色度子采样亮度-色度模型YCbCr 4:2:0)的基于块的转换方案。[18] 不含内容的情况下,RIFF容器要求只需20字节的开销,依然能保存额外的 元数据(metadata)。[2] WebP图像的边长限制为16383像素。[5]

WebP是基于块预测的。每个块都是根据它上面三个块的值和其左边一个块的值进行预测的(块解码以光栅扫描顺序完成:从左到右,从上到下)。块预测有四种基本模式:水平、垂直、DC(单色)和TrueMotion。利用离散余弦变换沃尔什-阿达玛转换将预测错误的数据和未预测块压缩在4×4像素子块中。这两种转换都是使用定点算术英语fixed-point arithmetic完成的,以避免舍入误差。输出使用熵编码进行压缩。[18] WebP也明确支持并行解码。[18]

参考实现包含一个Linux命令行程序的转换器,以及以及用于解码的,与WebM相同。开源社区很快设法将转换器移植到其他平台,例如Windows。[19]

WebP的无损压缩采用先进的技术,例如用于不同颜色通道的专用熵代码,利用反向参考距离的2D位置和最近使用的颜色的颜色缓存。这补充了字典编码、霍夫曼编码和颜色索引变换等基本技术。[14]

支援

目前網頁瀏覽器當中,Google ChromeOpera原生支援靜態與動態的WebP格式[20][21],而Google Chrome自12版開始支援WebP的漸進式解碼功能[22]。此外所有可以原生播放WebM影像的瀏覽器,也可以透過javascript來顯示WebP影像[23][24]。又Pale Moon 26+瀏覽器僅支援靜態的WebP圖像。Firefox瀏覽器亦在65.0版本支援WebP圖像。[25]

網頁瀏覽器GNOME WebKDE圖片瀏覽器Gwenview也支援WebP。

圖像軟體當中,Picasa(從3.9版本起)、PhotoLine英语PhotoLine[26]Pixelmator[27]ImageMagickXnViewIrfanViewGDAL[28]、Aseprite和GIMP(2.10起)皆原生支援WebP格式。

蘋果在macOS Sierra及iOS 10的早期beta版本中加入了WebP支援。[29]而在2016年9月7日釋出的iOS 10和macOS Sierra GM種子版本中卻移除了WebP的支援。

評論

x264的開發者之一:Jason Garrett-Glaser,針對WebP做出了幾點評論[30],根據和其他編碼器(JPEG、x264、Theora)測試的結果,他認為WebP的影像品質是最差的,多數是在模糊度方面。他也評論Google應該等到WebP可以超越JPEG之後再發佈。不過在2011年4月20日,他提到新的WebP編碼器表現的非常好,超越JPEG指日可待。

相關條目

參考文獻

  1. ^ WEBP file extension. DotWhat.net. [2010-10-01]. (原始内容存档于2013-03-13). 
  2. ^ 2.0 2.1 2.2 Rabbat, Richard. WebP, a new image format for the Web. Chromium Blog. Google. 2010-09-30 [2010-10-01]. (原始内容存档于2011-08-13). 
  3. ^ Zern, James. libwebp 1.2.0. Chromium. Google. 2021-01-30 [2021-01-30]. 
  4. ^ RIFF Container. Google Code. Google. [2010-10-01]. (原始内容存档于2013-03-13). 
  5. ^ 5.0 5.1 WebP FAQs. Google Code. Google. [2010-10-06]. (原始内容存档于2013-03-13). 
  6. ^ WebP Home: "Did you know? WebP is pronounced 'weppy'. /(wĕpˈē)/"
  7. ^ Chapman, Stephen. Google's New WebP Image Standard Is All About SEO. ZDNet. 2010-10-04 [2010-10-06]. (原始内容存档于2010-10-07). 
  8. ^ Calore, Michael. Meet WebP, Google's New Image Format. Wired. 2010-10-01 [2010-10-05]. 
  9. ^ Paul, Ryan. Google's new VP8-based image format could replace JPEG. Ars Technica. 2010-10-02 [2010-10-05]. (原始内容存档于2011-07-31). 
  10. ^ Shankland, Stephen. Google offers JPEG alternative for faster Web. CNET News. CBS Interactive. 2010-09-30 [2010-10-01]. (原始内容存档于2011-04-03). 
  11. ^ Rabbat, Richard. License/Patent clarification. 2010-10-03 [2011-03-11]. 
  12. ^ Comparative Study of WebP, JPEG and JPEG 2000. Google Code. Google. [2010-10-01]. (原始内容存档于2010-10-04). 
  13. ^ WebP v0.2.0 decoder and encoder source tree. [2013-08-21]. (原始内容存档于2013-07-01). 
  14. ^ 14.0 14.1 Google Developers Blog: Lossless and Transparency Modes in WebP
  15. ^ Google Code blog: Lossless and transparency encoding in WebP. [2013-08-21]. (原始内容存档于2011-11-20). 
  16. ^ WebP Container Specification: U+0020 for lossy images, and "L" for lossless images.
  17. ^ Glaser, Fiona. H.264 and VP8 for still image coding: WebP?. Diary Of An x264 Developer. 2010-09-30 [2010-10-01]. (原始内容存档于2015-03-19). 
  18. ^ 18.0 18.1 18.2 VP8 Data Format and Decoding Guide (PDF). Google. 2010-09-23 [2010-10-02]. [永久失效連結]
  19. ^ WebP for .NET. Codeplex. Microsoft. 2010-10-01. 
  20. ^ Metz, Cade. Google open sources JPEG assassin. The Register (San Francisco). 2010-09-30 [2010-10-03]. 
  21. ^ Ødegaard, Ruarí. CSS gradients, WebP, and Declarative UI. Opera Desktop Team (Opera Software ASA). My Opera. 2011-03-15 [2011-03-15]. (原始内容存档于2011-03-17). 
  22. ^ The Chromium Blog: WebP in Chrome, Picasa, Gmail With a Slew of New Features and Improvements. Google. 2011-05-21 [2011-05-20]. (原始内容存档于2011-08-06). 
  23. ^ Weppy Demo: WebP in modern browsers today. GitHub. [2010-10-11]. (原始内容存档于2011-08-11). 
  24. ^ Weppy: Javascript Shim for WebP on Chrome 6 and Firefox 4.0. Blog: this title probably isn't very original. antimatter15.com. 2010-10-03 [2011-05-24]. (原始内容存档于2011-01-13). 
  25. ^ Firefox 65 Release Note. 
  26. ^ Release notes Version 18.00. pl32.com. [2013-10-05]. 
  27. ^ David, Chartier. Pixelmator to Add Support for Google's WebP Image Format. PC World. IDG. 2010-10-04 [2010-10-05]. 
  28. ^ GDAL supported formats. gdal.org. GDAL - Geospatial Data Abstraction Library. [2011-11-30]. 
  29. ^ Stephen Shankland. Apple tests Google graphics format to speed up websites. CNET. 2016-07-19 [2016-07-20]. 
  30. ^ Garrett-Glaser, Jason. H.264 and VP8 for still image coding: WebP?. Diary Of An x264 Developer. 2010-09-30 [2010-10-01]. (原始内容存档于2010-11-27). 

外部連結