JPEG Compression Test: Google Photos vs. JPEGmini

googlephotosjpgmini

In this article I will take a look at Google Photos’ new photo compression performance. I’ve been using a program called JPEGmini for a couple years now to compress my JPEG images. Its compression of JPEGs is lossy, but it claims to do so leaving the perceptual image quality virtually unchanged. As far as I can tell, its claims are pretty accurate, and it has literally helped me cut the size of some of my picture folders in half.

As I’m sure most of you are aware, Google just unveiled Google Photos, and with it announced unlimited storage space for photos and videos. The unlimited part comes with a caveat: Google will apply lossy compression to your files.

Like JPEGmini, Google claims to be able to apply lossy compression to images without changing the perceptual quality of the image. If you analyze the uncompressed and compressed images with a computer, you can see differences — but by eye, they look identical.

So I a did a little test with a bright image to compare JPEGmini’s compression with Google’s compression. Take a look at this image:

comparison

This shows a comparison between the uncompressed image, Google’s compression, JPEGmini’s compression, and finally JPEGmini applied to an already Google-compressed image.

You can decide for yourself if there is any loss in visual acuity between the original, the Google-compressed, the JPEGmini-compressed, and the double-compressed image. To make it easier to view the images side-by-side, here’s an Imgur album with each individual frame, which you can load it separate browser tabs and click back and forth.

Below, I’ve produced a table showing the different compression ratios.

ratios

In my personal opinion, all four images have the same perceptual image quality. Google’s method is remarkably good. The reduction in image quality is almost imperceptible, yet it manages to nearly cut the file size in half. On the other hand, JPEGmini manages to eek out an extra 40% compression with only trivial image degradation. Most remarkable of all, though, is that by combining the two–Google and then JPEGmini–it doubled the compression even of the already-compressed image!

Of course, the double-compressed image has the most notable degradation of image quality, but even so, it is so minor that, I think, it is still almost certainly unnoticeable in large photographs.

Finally, for a more rigorous analysis of the actual differences between each of the four test cases (original, Google, JPEGmini, Google+JPEGmini), I loaded them up in Photoshop and used the difference layer effect to calculate the actual changes in the original image that the compression algorithms performed. You can see that here:

difference

What should be immediately clear is that Google’s compression algorithm was the least degrading by a long shot. The original, uncompressed image was only very slightly altered by Google’s method, and yet it still was able to nearly cut the filesize in half. JPEGmini’s compression is good, too, eeking out an extra 40% compression over Google’s while still causing relatively little damage to the original photo.

The biggest jump in image quality degradation is from applying JPEGmini to an already Google-compressed image. No pain no gain, I guess, but even so, I think it exhibits remarkably little degradation consider it is nearly a 100% improvement over either Google or JPEGmini’s algorithms alone.

A Better Test Image

Next, I redid the comparison with a slightly better image. The original image was just a photo taken on an 2014 Moto X. This time around, I used a studio test image taken by a Nikon D750 DSLR ($2000 camera) taken from DPReview. Because Google only allows a max photo size of 16 megapixels and the original test image was 24 MP, I downloaded the RAW format shot and resized it down to 16 MP in Photoshop before starting the test. You can grab the new test images here.

And now the updated table:

testtable2

This time the results are a little bit different, and there are some interesting results. Google’s algorithm performs a little bit better, and we see that the best overall compression is still when you perform a Google compression first, and then a JPEGmini compression on top of it.

Taking a look at the difference maps, we can see that JPEGmini and Google compress the JPEGs a little bit differently. JPEGmini’s difference maps are all nearly monochromatic. This means that JPEGmini isn’t altering the colors of the original image very much. Google, on the other hand, is altering the colors quite a bit.

difference2

That’s not necessarily a bad thing if Google can compress colors imperceptibly.

…But here’s the thing–it doesn’t. Take a look at the color wheels just to the right of the bottles at the bottom of the original image. JPEGmini compresses these well, but Google creates some nasty outlines around the edges of the circles.

imagecompare

Other than that, both JPEGmini and Google crush the details in the gray background differently, and I suspect that it’s up to personal preference as to which one is better.

Overall, I think Google and JPEGmini both have impressive algorithms. Google’s beats JPEGmini in compression some of the time, but it looks like there are still some kinks to work out to prevent aberrations and other artifacts. Nevertheless, I suspect that this is something Google will improve over time.

Given that Google has their own web browser and their own mobile OS, they’re more than capable of even pushing out new image formats or new standards. Until then, if you have some important images that you want to save from minor image artifacts, it might be prudent to keep an extra backup outside of Google Photos.


About the author: Brian Young is a photography enthusiast who’s interested in JPEG compression technologies. He has also shared his findings on Reddit.

Discussion