Reality of Repeated JPEG Compression

Facebooktwitterlinkedin

Today’s Question: I always hear that JPEG images deteriorate when opened multiple times, but I have never noticed any deterioration. Nobody ever says anything about how many times it has to be opened before it’s visibly starting to degrade. What are your thoughts?

Tim’s Quick Answer: Bottom line: You don’t have to worry about this issue. But it is true that JPEG images do degrade (very slightly) if you open them, apply adjustments, and save the updated image.

More Detail: The issue of JPEG image quality degradation from being opened multiple times is something I consider to be really a more theoretical discussion than an issue of practical importance. After all, if image quality is a major concern, you shouldn’t be using the JPEG format in the first place.

The JPEG format is convenient, ubiquitous, and efficient. It enables you to save images with a relatively small file size, which can then be shared easily with anyone regardless of which software they’re using. But the JPEG format also involves the use of compression that degrades image quality to achieve smaller file sizes. This degradation in image quality isn’t a significant concern if you’re simply sharing an image online or via email. But it can become a problem if you’re printing an image, for example.

When you save an image in the JPEG format, compression is applied to the image data. That generally means dividing the image into blocks of 16×16 pixels and simplifying the information within each of those blocks with a strength depending on the Quality setting you selected. Besides altering actual pixel values, this can also lead to an issue where the boundary of each block of pixels doesn’t align as well as it originally did because each block is compressed individually.

If you open and save the image without modification, the pixel values and the compression algorithms are the same, so you end up with the same results. But if you open an image, make changes to the pixel values, and then save the image, the compression is applied based on different pixel values and therefore additional degradation of image occurs.

Except at the very lowest Quality settings, the degradation of image quality is not generally a significant problem in the context of how JPEG images are normally shared. However, this can be a more significant concern for images that will be printed at a relatively large size, where any degradation of image quality gets amplified and is easier to see.

As noted above, if image quality is a paramount concern, I never recommend capturing JPEG images or saving images in the JPEG format. In addition to compression issues, there is also the matter of JPEG images only supporting 8-bit rather than 16-bit per channel bit depth. But if you’ve already decided that the JPEG format is worth the tradeoffs, saving a JPEG after applying adjustments to it isn’t an issue that should cause you any real concern.