Lossless and transparency encoding in WebP
    
    
    
    
    |  | 
| Urvang | 
|  | 
| Vikas | 
|  | 
| Jyrki | 
By
      Jyrki Alakuijala, Vikas Arora, and Urvang Joshi, Software Engineers, WebP
      TeamCross-posted with the Chromium BlogIn September 2010 we announced the 
WebP image format with lossy
      compression. WebP was proposed as an alternative to JPEG, with 
25–34% better
      compression compared to JPEG images at equivalent SSIM index. We received lots of feedback,
      and have been busy improving the format. 
Last
      month we announced WebP support for animation, ICC profile, XMP metadata and tiling.
      Today, we introduce a new mode in WebP to compress images losslessly, and support for
      transparency – also known as alpha channel – in both the lossless and lossy modes.
With these new modes, you can now use WebP to better compress all types of
      images on the web. Photographic images typically encoded as JPEG can be encoded in WebP lossy
      mode to achieve smaller file size. Icons and graphics can be encoded better in WebP lossless
      mode than in PNG. WebP lossy with alpha can be used to create transparent images that have
      minimal visual degradation, yet are much smaller in file size. Animations compressed as GIFs
      can use animation support in WebP.
New lossless
      modeOur main focus for lossless mode has been in compression
      density and simplicity in decoding. On average, we get a 45% reduction in size when starting
      with PNGs found on the web, and a 
28%
      reduction in size compared to PNGs that are re-compressed with pngcrush and pngout.
      Smaller images on the page mean faster page loads.
New
      transparency modeToday, webmasters who need transparency
      must encode images losslessly in PNG, leading to a significant size bloat. WebP alpha encodes
      images with low bits-per-pixel and provides an effective way to reduce the size of such
      images. Lossless compression of the alpha channel adds just 
22%
      bytes over lossy (quality 90) WebP encoding. Smaller alpha overhead means richer
      images on webpages.
You can find a more detailed compression study for
      these modes 
here
      and sample images in the 
WebP-Gallery. The bit
      stream specification has not been finalized, and the encoding and decoding implementations
      have not yet been optimized for processing speed. We encourage you to 
try
      it out on your favorite set of images, check out the 
code,
      and 
provide
      feedback. We hope WebP will now handle all your needs for web images, and we're
      working to get WebP supported in more browsers.
Dr. Jyrki Alakuijala is a Software Engineer with a special interest in data
      compression. He is a father of five daughters, and sings in the Finnish Choir in Zürich.
      Before joining Google, Jyrki worked in neurosurgical and radiotherapy
      development.Vikas Arora is a Software Engineer
      with a special interest in signal processing and data compression. Before joining Google,
      Vikas worked in the VLSI domain developing digital and analog signal
      simulators.Urvang Joshi is a Software Engineer,
      especially interested in image processing, machine learning, and computer vision. He is also a
      table tennis and chess enthusiast.Posted by Scott Knaster,
      Editor