|Internet media type||
|Initial release||30 September 2010|
(21 April 2018)
|Type of format||
Lossless/lossy compression algorithm
|Contained by||Resource Interchange File Format (RIFF)|
The format was first announced on 30 September 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. 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).
On 18 November 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 (16 August 2012). 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.
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. 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.
||VP8 key frame|
|pad||? (even length)|
WebP's lossy compression algorithm is based on the intra-frame coding of the VP8 video format and the Resource Interchange File Format (RIFF) as a container format. 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). Without further content, the mandatory RIFF container has an overhead of only twenty bytes, though it can also hold additional metadata. The side length of WebP images is limited to 16383 pixels.
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. WebP also has explicit support for parallel decoding.
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.
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.
Amongst graphics software, Picasa (from version 3.9), PhotoLine, Pixelmator, ImageMagick, XnView, IrfanView, GDAL and Aseprite all natively support WebP. Telegraphics has released a free plug-in that enables WebP support in Adobe Photoshop. 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. GIMP and Paint.NET 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, and any other application that uses Windows Imaging Component.
FFmpeg linked with the VP8/VP9 reference codec library 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. Android 4.0 supports encoding and decoding WebP images (via bitmap and Skia). SDL_image supports the format since 1.2.11.
In early beta versions of macOS Sierra and iOS 10, Apple added WebP support. In the GM seed versions of iOS 10 and macOS Sierra released 7 September 2016, WebP support has been removed.
Like VP8 on which it is based, former lossy WebP only supports 8-bit YUV 4:2:0 format, 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.
In September 2010, Fiona Glaser, a developer of the x264 encoder, wrote a very early critique of WebP. 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."
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 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 and was not able to conclude WebP outperformed JPEG by any significant margin.
- FLIF, a work-in-progress lossless image format which claims to outperform PNG, lossless WebP, lossless BPG and lossless JPEG2000 in terms of compression ratio, introduced in 2015
- 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
- HEIF, another image format based on HEVC
- JPEG XR, an alternative to JPEG 2000 supporting HDR and wide gamut color spaces, introduced in 2009
- JPEG 2000, an improvement intended to replace the older JPEG by the JPEG committee, introduced in 2000
- MNG and APNG, PNG-based animated image formats, supporting lossless 24-bit RGB color and 8-bit alpha channel
- "WEBP file extension". DotWhat.net. Retrieved 1 October 2010.
- Rabbat, Richard (30 September 2010). "WebP, a new image format for the Web". Chromium Blog. Google. Retrieved 1 October 2010.
- Zern, James (21 April 2018). "libwebp 1.0.0". Chromium. Google. Retrieved 21 April 2018.
- "RIFF Container". Google Code. Google. Retrieved 1 October 2010.
- "WebP FAQs". Google Code. Google. Retrieved 6 October 2010.
- Calore, Michael (1 October 2010). "Meet WebP, Google's New Image Format". Wired. Condé Nast. Retrieved 5 October 2010.
- Shankland, Stephen (30 September 2010). "Google Offers JPEG Alternative for Faster Web". CNET News. CBS Interactive. Retrieved 1 October 2010.
- Paul, Ryan (2 October 2010). "Google's New VP8-Based Image Format Could Replace JPEG". Ars Technica. Condé Nast. Retrieved 5 October 2010.
- Rabbat, Richard (3 October 2010). "License/Patent clarification". Google Groups. Google. Retrieved 11 March 2011.
- "Comparative Study of WebP, JPEG and JPEG 2000". Google Code. Google. Archived from the original on 4 October 2010. Retrieved 1 October 2010.
- Arora, Vikas (3 October 2011). "WebP-Mux (RIFF based container) framework". Google Groups. Google. Retrieved 18 November 2011.
- Alakuijala, Jyrki (30 August 2012). "Lossless and Transparency Modes in WebP". Google Developers Blog. Google. Retrieved 6 September 2012.
- Zern, James (16 August 2012). "Version 0.2.0". Chromium. Google. Retrieved 6 January 2017.
- Alakuijala, Jyrki; Arora, Vikas; Joshi, Urvang (18 November 2011). "Lossless and Transparency Encoding in WebP". Google Code Blog. Google. Retrieved 18 November 2011.
- "Frequently Asked Questions". Google. 2014-02-21. Retrieved 2014-02-23.
- WebP Container Specification: U+0020 for lossy images, and "L" for lossless images.
- Glaser, Fiona (2010-09-30). "H.264 and VP8 for still image coding: WebP?". Diary Of An x264 Developer. Archived from the original on March 19, 2015. Retrieved 2010-10-01.
- "VP8 Data Format and Decoding Guide" (PDF). Google. 2010-09-23. Retrieved 2010-10-02.
- "WebP for .NET". Codeplex. Microsoft. 2010-10-01.
- Metz, Cade (2010-09-30). "Google open sources JPEG assassin". The Register. San Francisco. Retrieved 2010-10-03.
- Ødegaard, Ruarí (2011-03-15). "CSS gradients, WebP, and Declarative UI". Opera Desktop Team. Opera Software ASA. My Opera. Archived from the original on 2011-03-17. Retrieved 2011-03-15.
- Brinkmann, Martin (2016-08-24). "Mozilla plans to add Webp support to Firefox". gHacks Technology News. Retrieved 2016-08-24.
- "Weppy Demo: WebP in modern browsers today". GitHub. Retrieved 2010-10-11.
- "WebPJS - Google's new image format WebP for not supported browsers (with alpha-channel)". Retrieved 2011-11-20.
- Picasa and Picasa Web Albums Release Notes
- "Release notes Version 18.00". pl32.com. Retrieved 2013-10-05.
- David, Chartier (2010-10-04). "Pixelmator to Add Support for Google's WebP Image Format". PC World. IDG. Retrieved 2010-10-05.
- "ImageMagick Image Formats". ImageMagick.org. ImageMagick Studio LLC. Retrieved 2011-05-24.
- "XnView Software - All Supported Formats". xnview.com. Pierre-Emmanuel Gougelet. Retrieved 2014-01-06.
- History of IrfanView changes
- "GDAL supported formats". gdal.org. GDAL - Geospatial Data Abstraction Library. Retrieved 2011-11-30.
- "Aseprite - Release-notes". www.aseprite.org. Retrieved 2016-03-28.
- "WebP Format". Free plugins for Photoshop & Illustrator. Telegraphics. Retrieved 2011-05-23.
- "Adobe WebM/WebP plugins". fnordware.com. Retrieved 2015-06-29.
- "nathan-osman/gimp-webp: Gimp plugin for loading and saving WebP images". Retrieved 2016-03-30.
- "WebP Filetype". Retrieved 2013-05-18.
- FastPictureViewer Image Formats Compatibility
- "WebP Codec for Windows". WebP website. Google Code. Retrieved 2011-05-24.
- "The Chromium Blog: WebP in Chrome, Picasa, Gmail With a Slew of New Features and Improvements". Google. 2011-05-21. Retrieved 2011-05-20.
- Android 4.0 Platform Highlights
- "Stickers Done Right"
- Stephen Shankland (2016-07-19). "Apple tests Google graphics format to speed up websites". CNET. Retrieved 2016-07-20.
- Google (November 2011). "Format Overview". VP8 Data Format and Decoding Guide. IETF. sec. 2. doi:10.17487/RFC6386. RFC 6386. https://tools.ietf.org/html/rfc6386#section-2. Retrieved 2014-01-21.
- "Frequently Asked Questions".
- "WebP Lossless Bitstream Specification".
- "About WebM". WebM. Retrieved 2014-01-21.
- Josh Aas. "Studying Lossy Image Compression Efficiency". Mozilla Research Blog. Retrieved 2014-09-10.
- Josh Aas. "Mozilla Advances JPEG Encoding with mozjpeg 2.0". Mozilla Research Blog. Retrieved 2014-09-10.
|Wikimedia Commons has media related to WebP file format.|