21

I'm sure that many of us have used Google photos high quality backup which allows us to store photos online without fees.

Recently, I thought of testing just how high quality the uploads really were by uploading some pics (below 16 MP) and comparing them to the original in terms of resolution, quality (as seen by the eye) and file size.

I was surprised to note that the resolution and quality were almost the same as the original (no visual difference to the eye even zoomed in in most cases) but the file size was drastically reduced -- at least 2-3x and even around 10x in some cases. Having used RAR for various types of files in the past, I knew that it wouldn't come close and didn't bother to test it.

The question is : How does Google manage such great compression without any noticeable change in the image itself? Are they dumping location data or other data related to the image that the amateur photographer doesn't know of?

  • 2
    My answer actually does address the second question. They haven't found a magical general lossless compression algorithm like a super version of ZIP or RAR. They have just enhanced JPEG-specific compression. – mattdm Jun 30 '18 at 20:41
20

Well, for one thing, all photos larger than 16 megapixels are resized to 16 MP — so, for many cameras today, that's an immediate, obvious drop in resolution.

But all other photos are compressed too, using an optimizing compression algorithm. I don't think Google comes out and says exactly what they do, but it's probably their open source Guetzli algorithm. Google claims:

Guetzli-generated images are typically 20-30% smaller than images of equivalent quality generated by libjpeg.

Whatever they're doing, the results are pretty impressive — often much greater than 20-30%. (It probably follows that Google does not consider these really "equivalent quality".) You can see some side-by-side comparisons in this Phone Arena blog post.

But, to your title question: you are definitely losing some data. This algorithm isn't magic — it simply uses a perceptual model to discard visual data that conventional JPEG compression does not, resulting in higher compression rates while (hopefully) not causing any more disturbance to things that you can actually notice.

Only you can decide if you're okay with that. If you're backing up RAW originals (with adjustments also backed up) and can recreate the JPEGs at will, I wouldn't think twice about it. But if you're serious about photography and have a JPEG-centered workflow — and despite online RAW snobbery, that's fine — you probably want to at least keep the original JPEG files unaltered. Adding a terabyte of storage is only $10/month with Google. Or if you are an Amazon Prime customer ($100/year) you get actual unlimited photo storage, including of RAW files.

5

They are basically throwing processing power at the problem, using very compute intensive approaches that tries out various ways to compress the image within the JPG rules. Processing is something google likely has plenty of, especially as it also saves bandwdith.

You can do the same - the software and various services are free or cheap. Your program / camera does simply not have the processing power to come up with an "optimal" way to use JPG lossy compression.

  • This is a good point although it will only reduce the size of image by a small proportion. – Salman A Jun 30 '18 at 21:28
  • 4
    Wow, that Guetzli algorithm mentioned by @mattdm above is a hog! On the github site with the software it tells you it needs 300Mb RAM per megapixel of image to process, and it takes one full minute CPU time per megapixel as well! – davidbak Jul 1 '18 at 6:00
  • Yeah. Basically "try out a lot of combinations and then use the best one". Which neigher Lightroom nor for example your camera (in particular your camera) can do. – TomTom Jul 3 '18 at 7:30
  • But since the algorithm is basically recompressing an already compressed JPEG image, isn't this inferior in result to if you apllied the same algorithm to the original? – Michael Jan 10 at 2:37
  • Yeah. No. Look up Gützli. Jpeg - partciualrly done by cameras - is done FAST. Tehy can spend a minute finding the optimal encoding per picture Services like compressor.io do the same. You get very significant size reductions with optically the same image. – TomTom Jan 10 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.