WebP
Filename extension | .webp[1] |
---|---|
Internet media type | image/webp (unofficial) |
Magic number | WEBP |
Developed by | |
Initial release | 30 September 2010[2] |
Latest release |
0.5.0
(23 December 2015[3]) |
Type of format | Image format Lossless/lossy compression algorithm |
Contained by | Resource Interchange File Format (RIFF)[4] |
Open format? | Yes[5] |
Website | developers |
WebP is an image format employing both lossy[6] and lossless compression. It is currently developed by Google, based on technology acquired with the purchase of On2 Technologies.[7]
As a derivative of the VP8 video format, it is a sister project to the WebM multimedia container format.[8] WebP-related software is released under a BSD license. [9]
The format was first announced in 2010 as a new open standard for lossily compressed true-color graphics on the web, producing smaller files of comparable image quality to the older JPEG scheme.[10] On October 3, 2011 Google announced WebP support for animation, ICC profile, XMP metadata and tiling (compositing very large images from maximum 16384×16384 tiles).[11]
On November 18, 2011 Google began to experiment with lossless compression and support for transparency (alpha channel) in both lossless and lossy modes; support has been enabled by default in libwebp 0.2.0 (August 16, 2012).[12][13] According to Google's measurements, a conversion from PNG to WebP results in a 45% reduction in file size when starting with PNGs found on the web, and a 28% reduction compared to PNGs that are recompressed with pngcrush and PNGOUT.[14]
Google has proposed using WebP for animated images as an alternative to the popular GIF format, citing the advantages of 24-bit color with transparency, combining frames with lossy and lossless compression in the same animation, and as well as support for seeking to specific frames.[15] Google reports a 64% reduction in file size for images converted from animated GIFs to lossy WebP, and a 19% reduction when converted to lossless WebP.
Technology
Bytes | Content | |||
---|---|---|---|---|
0- 3 | R | I | F | F |
4- 7 | length+8 | |||
8-11 | W | E | B | P |
12-15 | V | P | 8 | ␠ |
16-19 | length (padded) | |||
20- … | VP8 key frame | |||
pad | ␀ (even length) |
WebP's lossy compression algorithm is based on the intra-frame coding of the VP8 video format[16] and the Resource Interchange File Format (RIFF) as a container format.[2] As such, it is a block-based transformation scheme with eight bits of color depth and a luminance-chrominance model with chroma subsampling by a ratio of 1:2 (YCbCr 4:2:0).[17] Without further content, the mandatory RIFF container has an overhead of only twenty bytes, though it can also hold additional metadata.[2] The side length of WebP images is limited to 16383 pixels.[5]
WebP is based on block prediction. Each block is predicted on the values from the three blocks above it and from one block to the left of it (block decoding is done in raster-scan order: left to right and top to bottom). There are four basic modes of block prediction: horizontal, vertical, DC (one color), and TrueMotion. Mispredicted data and non-predicted blocks are compressed in a 4×4 pixel sub-block with a discrete cosine transform or a Walsh–Hadamard transform. Both transforms are done with fixed-point arithmetic to avoid rounding errors. The output is compressed with entropy encoding.[17] WebP also has explicit support for parallel decoding.[17]
The reference implementation consists of converter software in the form of a command-line program for Linux (cwebp) and a programming library for the decoding, the same as for WebM. The open source community quickly managed to port the converter to other platforms, such as Windows.[18]
WebP’s lossless compression uses advanced techniques such as dedicated entropy codes for different color channels, exploiting 2D locality of backward reference distances and a color cache of recently used colors. This complements basic techniques such as dictionary coding, Huffman coding and color indexing transform.[13]
Support
Amongst web browsers, Google Chrome, Opera and Pale Moon natively support WebP.[19][20][21] All WebM-compatible browsers can also display WebP via a JavaScript shim.[22][23] WebP can also be displayed in all major browsers using the WebPJS JavaScript library, although support in Internet Explorer 6 and above is achieved using Flash.[24]
Amongst graphics software, Picasa (from version 3.9),[25] PhotoLine,[26] Pixelmator,[27] ImageMagick,[28] XnView,[29] IrfanView,[30] GDAL [31] and Aseprite[32] all natively support WebP. Telegraphics has released a free plug-in that enables WebP support in Adobe Photoshop.[33] The plugin was last updated in 2013 so it saves using an older revision of the WebP format. A more current beta Photoshop plugin has also been released by fnordware.[34] GIMP[35] and Paint.NET[36] support WebP via plugins. Google has also released a plug-in for Microsoft Windows that enables WebP support in Windows Photo Viewer, Microsoft Office 2010, FastPictureViewer,[37] and any other application that uses Windows Imaging Component.[38]
FFmpeg linked with libvpx can extract VP8 key frames from WebM media and a script can then add the WebP RIFF header and the NUL pad byte for odd frame lengths. Meanwhile, FFmpeg supports libwebp directly.
Gmail and Picasa Web Albums (both Google web applications) support WebP. Support for WebP is also planned for Google App Engine. The Instant Previews feature of Google Search currently uses WebP internally to reduce disk space used by previews.[39] Android 4.0 supports encoding and decoding WebP images (via bitmap and Skia).[40] SDL_image supports the format since 1.2.11.
Telegram Messenger uses WebP for their Stickers, claiming they are displayed 5 times faster compared to the other formats usually used in messaging apps.[41]
Restrictions
Like VP8 on which it is based, former lossy WebP only supports 8-bit YUV 4:2:0 format,[42] which may cause color loss on images with thin contrast elements (such as in pixel art and computer graphics) and ghosting in anaglyph. To overcome this restriction, new lossless WebP supports VP8L encoding that works exclusively with 8-bit ARGB color space.[43][44]
Criticism
In September 2010, Fiona Glaser, a developer of the x264 encoder, wrote a very early critique of WebP.[16] Comparing different encodings (JPEG, x264, and WebP) of a reference image, she stated that the quality of the WebP-encoded result was the worst of the three, mostly because of blurriness on the image. Her main remark was that "libvpx, a much more powerful encoder than ffmpeg's jpeg encoder, loses because it tries too hard to optimize for PSNR" (peak signal-to-noise ratio), arguing instead that "good psycho-visual optimizations are more important than anything else for compression."[16]
Pascal Massimino, developer of the cwebp encoder, reports improvements to the WebP encoder with a number of defects resolved since the preview releases. As WebP (and the WebM standard upon which it is based) is an open-source format[45] under active development, issues can be expected to both resolve and regress as they are addressed on an ad-hoc basis.
In October 2013, Josh Aas from Mozilla Research published a comprehensive study of current lossy encoding techniques[46] and was not able to conclude WebP outperformed JPEG by any significant margin.[47]
See also
- MNG and APNG, another animated image format, related to PNG
- JPEG 2000, an improvement intended to replace the older JPEG by the JPEG committee, introduced in 2000
- JPEG XR, an alternative to JPEG 2000 supporting HDR and wide gamut color spaces, introduced in 2009
- BPG, an image format intended to be a more compression-efficient replacement for the JPEG image format, based on the intra-frame encoding of the High Efficiency Video Coding (HEVC) video compression standard, introduced in 2014
References
<templatestyles src="Reflist/styles.css" />
Cite error: Invalid <references>
tag; parameter "group" is allowed only.
<references />
, or <references group="..." />
External links
- No URL found. Please specify a URL here or add one to Wikidata.
- Windows codec
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ 2.0 2.1 2.2 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ 5.0 5.1 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ WebP-Mux (RIFF based container) framework
- ↑ WebP v0.2.0 decoder and encoder source tree
- ↑ 13.0 13.1 Google Developers Blog: Lossless and Transparency Modes in WebP
- ↑ Google Code blog: Lossless and transparency encoding in WebP
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ 16.0 16.1 16.2 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ 17.0 17.1 17.2 Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ https://www.palemoon.org/releasenotes.shtml
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Picasa and Picasa Web Albums Release Notes
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ History of IrfanView changes
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ FastPictureViewer Image Formats Compatibility
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Android 4.0 Platform Highlights
- ↑ "Stickers Done Right"
- ↑ Google (November 2011). "Format Overview". VP8 Data Format and Decoding Guide. IETF. sec. 2. RFC 6386. https://tools.ietf.org/html/rfc6386#section-2. Retrieved 2014-01-21.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.