Google tweaks WebP to take on PNG and JPEG

The company has upgraded WebP with lossless compression and transparency support, saying the image format can now be used to compress 'all types of images on the web', resulting in quicker surfing

Google's WebP image format can now be used to compress all types of images on the web for speedier surfing, the company has said.

WebP examples

Google has updated its WebP image format with lossless compression capabilities, shown in this comparison on the Google website. Screenshot: Jon Yeomans

According to a blog post on Friday, Google has upgraded its WebP image format with lossless compression capabilities, as well as with transparency support that makes the format a rival to PNG as well as JPEG.

WebP is a format that Google introduced last year, as part of its quest to make the web run faster. It is so far only supported by the Chrome and Opera browsers.

"With these new modes, you can now use WebP to better compress all types of images on the web," Google software engineers Jyrki Alakuijala, Vikas Arora and Urvang Joshi wrote in the blog post. "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."

Encoding photographs in WebP makes them as much as 34-percent smaller than if they are encoded in the popular JPEG format, the engineers wrote. Smaller file sizes lead to speedier page loads, and a generally faster web-surfing experience for the user.

However, much of the web uses the PNG format for images, partly because it is lossless and therefore provides better quality, and partly because it supports transparency. Alpha channel transparency can be applied to parts of an image to allow the remainder of the image to render attractively on different backgrounds.

PNG nonetheless has disadvantages, chief of which is the fact that it produces bigger image files than JPG does. According to Google, the revamped WebP results in files that are 45-percent smaller than their equivalent PNGs, and 28 percent smaller than PNGs compressed using tools such as pngcrush and pngout.

With these new modes, you can now use WebP to better compress all types of images on the web.

– Google

WebP alpha, a mode that allows transparency, losslessly compresses the alpha channel of the image. This "adds just 22-percent [more] bytes over lossy (quality 90) WebP encoding", the coders said. "Smaller alpha overhead means richer images on web pages."

The Google engineers pointed out that the new version of WebP still needs some tweaking. "The bitstream specification has not been finalised, and the encoding and decoding implementations have not yet been optimised for processing speed," they noted.

WebP is a sister project to WebM, Google's open video format, which is also based on the VP8 compression format. Google introduced WebP in October 2010, and has updated it several times already. Most recently, in October this year, enhancements included support for animation, ICC profile, XMP metadata and tiling.

Get the latest technology news and analysis, blogs and reviews delivered directly to your inbox with ZDNet UK's newsletters.="http:>