you're reading...
gvsig mobile, tiling, wonthurt

Google’s WebP vs JPEG: a more comprehensive test

My previous post was a bit unfortunate. The only relevant conclusion of it is that WebP does provide better compression ratios than JPEG for the same level of lossiness. Here is a new comparison method:

  • Take the original image and compress it to WebP and JPEG using all possible quality levels. In both cases, the compression program accepts values between 1 and 100, so you get 200 compressed images.
  • Find out the PSNR value (lossiness) for each compressed image.
  • For a given requested PSNR value, we’ll estimate the image size by interpolating the closest available values (lower and higher)

According to this article, sensible PSNR values are between 20 (low-quality images, allowed for example when very limited bandwidth is available) and 50 (extremely high-quality images, often not necessary). I have used these four lossless images for the test (2048 x 2048 pixels each):

And these are the resulting line-point charts. If there is no data for a given PSNR value, it’s because it was not possible to create an image with that level of lossiness (all values were tested for the quality parameter of both compressors):




Relevant results can be seen in this table (click to see in PDF format):

Comments

  • We can see that the WebP format is able to improve JPEG’s performance by about 40% in certain cases. Apparently they have targeted PSNR values in the range [25-30]. If you need a very low level of lossiness (PSNR above 35, for example) you may find that WebP is not better, or even is unable to provide such images.
  • I had always suspected that it was mathematically impossible to significantly improve the JPEG compression ratios, but I am impressed by the performance of WebP, at least in the [25-30] range for PSNR (the vast majority of commercial images and video frames probably fall inside that range, by the way.)
  • It will be interesting to see if Google adopts (or at least supports) this format in their web browsers, mapping apps, etc. Even if we assume that WebP is, let’s say, 30% better than JPEG globally, will it pay off in a context where capabilities, requirements, volumes etc. often evolve with a geometrical or exponential rather than linear pattern?
Advertisements

Discussion

3 thoughts on “Google’s WebP vs JPEG: a more comprehensive test

  1. I tested it WebP myself, visually. I used a PNG image and created a JPG image with 10% quality, and a WebP image with 10% quality. I soon noticed that the JPG image looked much better! I concluded that WebP needs its quality set to 70% in order to match (not even beat) the JPG image regarding visual quality. The PNG image is 2,141KB, the JPG image 78KB and the WebP 65KB. The WebP file is around 20% smaller than the JPG.

    I saw some comparisons by Google, and I noticed that the JPGs they used for comparison were set to a much higher quality (i.e. they take up more space) for generating unfair results. Be wary, don’t believe everything. It sounded too good to be true so I tested it and I got different results.

    I have not tested the transparency or its lossless capabilities.

    A 20% smaller image is indeed impressive, but don’t believe all the tests out there, do a test yourself!

    Posted by Roland | 09/01/2013, 8:07 PM
    • Hello, Roland. Thanks for your message. I have not done any tests after this post. In my opinion, WebP is only a bit better than JPG, and in any case, the improvement you get is probably not enough to start an expensive campaign to replace JPG, especially in a world where band width is constantly improving.

      Posted by Juan Lucas Domínguez Rubio | 10/01/2013, 12:46 PM

Trackbacks/Pingbacks

  1. Pingback: A Comprehensive Guide to WebP | Web Performance Monitoring and Optimization - 08/03/2013

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: