About JPEG Images and Their Quality Degradation

About JPEG Images and Their Quality Degradation

You lose information when an image is saved in JPEG format. This is acceptable, unless you save the same image more than once. Let’s have a look at how much information you really lose.

The JPEG file format is widely used because of its small file size. You can use it on the internet, social media, and for print shops and albums. The file size can be so small because of its smart algorithms that can compress the file by throwing away the less important image data. Although there are smarter and better ways in doing this, for now the JPEG is still the standard.

Not every camera has the option to shoot in raw file format, like this Sony DSC-HV400v superzoom compact camera. For photographers who use these kind of cameras, this article could be good to read.

Not every camera has the option to shoot in raw file format, like this Sony DSC-HV400v superzoom compact camera. Especially for photographers who use these kind of cameras, this article could be good to read.

First of all, I think the wisest thing to do is using the raw image data of the camera, and post processing your images yourself. If your camera can shoot in raw format, that is. The raw format allows you to use the maximum amount of information generated by the sensor. You can correct colors, exposure, and contrast without the penalty of image degradation. Up to a certain amount, of course. But you can also directly save your photo in JPEG format 

The software inside cameras can be used to give the in-camera JPEG a certain look. But this is very limited and it is less easy due to a number of different reasons. By saving the image as a JPEG in your camera, even in the best quality, you will throw away information. Not only the extra sensor information, but also due to image compression.

If you use in-camera JPEG images just the way it came off the memory card, and you don’t change anything anymore, then it is okay to do so. With most cameras the image is quality wise more than acceptable, as long as you save in the highest JPEG size available. But be careful with that file. Whenever you change anything in that JPEG, you will throw away information again when saving it a second time. And again a third time, and a fourth time. And so on.

Saving an image in JPEG format. I always choose the highest quality, although that might be unnecessary. Nevertheless, I used this setting for my experiment.

Saving an image in JPEG format. I always choose the highest quality, although that might be unnecessary. Nevertheless, I used this setting for my experiment.

I became curious on how soon that information loss will be visible. We all read about it, we all know it happens, but a lot of photographers don’t realize what the effects are when you save a JPEG multiple times. That is why I took the time to generate a 1280 pixel JPEG image from a raw file, in the best possible quality, and save it over and over again. I wanted to see how often this could be done without losing the image.

I decided to open the original JPEG file in Photoshop 2020 and save it as a new second image. I opened that second image, to save it a third time as a new image. Next, I opened the third image and saved it again as a fourth new image. And so on, until I saved it 99 times. With each new file, the software compressed the image, reducing the image quality. This is what I saw happening

This is the JPEG file, generated from the RAW file, in Lightroom. This is the starting point.

This is the JPEG file, generated from the RAW file, in Lightroom. This is the starting point.

After ten times saved, the quality of the file is reduced so much, you can see the artifacts appear. I already find this an unacceptable, unusable quality.

After ten times saved, the quality of the file is reduced so much, you can see the artifacts appear. I already find this an unacceptable, unusable quality.

Just to see what will happen when the image is saved over and over again. After twenty times, the quality is very poor. This image can never be used, not even on social media like Facebook.

Just to see what will happen when the image is saved over and over again. After twenty times, the quality is very poor. This image can never be used, not even on social media like Facebook.

The image degradation continues and this is the result after thirty times saved. Nobody want their images to look like this.

The image degradation continues and this is the result after thirty times saved. Nobody want their images to look like this.

This is how an image will look after you save it fifty times. Nobody will be saving their image that many times, but is good to see how terrible a JPEG will turn out if you save it over and over again.

This is how an image will look after you save it fifty times. Nobody will be saving their image that many times, but is good to see how terrible a JPEG will turn out if you save it over and over again.

After seventy times, this will be the result.

After seventy times, this will be the result.

After ninety nine times saved, the image looks like this. It clearly shows how the quality will degrade.

After ninety nine times saved, the image looks like this. It clearly shows how the quality will degrade.

When the image was saved a tenth time, I found it already unusable. I could have stopped there, but I wanted to see the result after 99 times. It was shocking to see the amount quality loss after only a few times. 

For this experiment I did not do any post processing. I just opened the file and saved it as a new file. I did the same experiment with an invert filter, every time I opened and saved the file, and the end result was the same.

This is the difference between the original JPEG from the raw file, and the file that has been saved for ninety nine times. It doesn't matter if you perform any post-processing or not, the result will be the same. Unless you post-processing will degrade t

This is the difference between the original JPEG from the raw file, and the file that has been saved for ninety nine times. It doesn't matter if you perform any post-processing or not, the result will be the same. Unless you post-processing will degrade the image even more of course.

A close inspection revealed to me, that the JPEG image has already significant quality loss after you save it six times, and to be honest, if you look real close to the five times saved image, there is already some quality loss visible.

Although I knew this would happen, I am surprised how much you lose after only six times. In a way it changed my thoughts about the JPEG file format.

This is the result after six times saved. I think this is the point where image degradation will become too obvious. This image has become unusable for high quality prints. The breaking point will also be depending on the complexity of the image, I presum

This is the result after six times saved. I think this is the point where image degradation will become too obvious. This image has become unusable for high quality prints. The breaking point will also be depending on the complexity of the image, I presume.

I know there are photographers who insist on shooting in JPEG image format. And although I would not advise doing so, I can understand why. Perhaps they don’t know how to handle a raw file, or perhaps they are convinced this is the only honest way of photography. Or perhaps their camera has unique film simulations that produce amazing results, even in JPEG. There are also the photographers that don't have a camera that can save a raw image.

No matter what reason, I only can advise those JPEG shooters to be careful with their JPEG files, and never save that file a second time in JPEG format. Because every time you do, you will lose quality. If you insist on using JPEG, just make sure you keep the original JPEG on your computer and use it as the starting point of every correction you might do on that file. Always save the changed file as a new file, never overwrite the original. This way you will treat the original JPEG as a digital negative, from which you can work as a starting point.

Ninety nine files, each saved from the previous one, with a simple postprocessing performed that will not degrade the image even more. If you want to change your JPEG file, make sure you keep the original one original. Don't overwrite that file with the n

Ninety nine files, each saved from the previous one, with a simple postprocessing performed that will not degrade the image even more. If you want to change your JPEG file, make sure you keep the original one original. Don't overwrite that file with the new version. Ever.

A few things might be interesting to know also:

  • Although you might not want to change anything to a JPEG, you might want to have a smaller version, or perhaps you want to level a horizon, or crop it, or you might opened it and save it by mistake. Saving it again might occur more often than you think.
  • Copying the JPEG file won’t affect the quality, only opening it and saving it again will do that.
  • Opening the JPEG and by saving it as a lossless TIFF or DNG file, you will prevent further degradation when working on the file.
  • When saving a JPEG as a TIFF of DNG file, you are better off shooting a raw file format in the first place.

I just want to point out, you have to be careful when you are shooting in JPEG. Keep the original file untouched. If you do, you will be alright.

Did you realize how soon image degradation will occur when saving a JPEG file again and again? And if you shoot JPEG, would you consider using raw files in the future, or will you continue shooting in JPEG and protect your files from saving it a second time? I would love to read about it in the comments below.

Log in or register to post comments

60 Comments

Jpeg is not the best file possible is known but this is not the correct way to do this thing... 'cause it's obvious that if you start with a jpeg saving everytime in a different image you lower the size 'cause you compress the precedent one ( especialy if you change the quality even only by 1 point )... but nothing happens if you work on the same image... I think none of us will worlk on copies saved 99 times...

Pierre Dasnoy's picture

That depends on the workflow : Someone who, for all his picture, make one change, save and close, that can go fast : Straight horizon, crop, light and contrast, colors, filters... that's already 5 changes on each picture. No need to reach 99 changes to see quality loss.

Nando Harmsen's picture

As I said, there are people who will open, change and save it again. Not as a new copy, but the same file. If they open it again, because it has to be changed a little bit more, it already be a third save.
You would be surprised how easy it is to save a file over and over again.

Benoit Pigeon's picture

I have made very good money in the past fixing files that had been saved over and over many times and converted a few times to various profiles. It's tedious to get something "usable" but I wasn't cheap either.

dean wilson's picture

JPEG came out in 1992. Windows 3.1 also came out in 1992.

Anyone still using Windows 3.1?

Nando Harmsen's picture

I understand you don't use JPEG anymore. In that case, in what format are you sharing your work?

dean wilson's picture

My comment is meant to reflect the dated-ness of jpeg. JPEG XL or HEIF for a better format, however UNTIL they become popular enough for websites to accept them as an option, were stuck in the '90's.

I send .tiff for sharing photos.

Nando Harmsen's picture

tiff for sharing photos? That wouldn't be my first choice. ;)
HEIF is new, and probably becoming more popular the next year, I think. All the other won't be accepted. A lot of other formats have been proposed, but none have been able to make it

The amount of jpeg is severely lacking here... let's fix that.
http://needsmorejpeg.com/i/jlRNP

Pierre Dasnoy's picture

I puked
What's this ? A bot that kills pictures ?

I've saved JPEGs a ton over and over and never had the degradation shown here. I may have better software -- not sure how to explain it.

Nando Harmsen's picture

In that case you should teach us how to do this.

dean wilson's picture

What is your formula for weighing pixels?
I need to find out how many actual images I can get in 5 pounds.

First, if you save over and over without re-opening the image, you don't suffer from the problem because your software keeps the uncompressed representation. Second, if the software you use is not photoshop, the behavior may be different since the problem here is not just JPEG but the combination of JPG plus Photoshop. JPEG on its own would not behave as badly, but photoshop tries to be smart when opening JPG files, which unfortunately ends up creating lots of problems if you do it too many times.

Nando Harmsen's picture

It mimics the use of a JPEG file over time, of course. About PS, you always use the software of your choice and the possibility it offers, not about the way it behaves with JPEG images. I do believe other software will provide different results, but the degradation will occur in some way or another each time you open and save the image.

I don't have your patience but I bet it wouldn't occur half as much in a simpler software like gimp. Of course assuming you don't edit the image between save/open. The overall point remains true: JPG is not a good format for editing and quality loss accumulates. It's probably the best archival storage format though because it is the most widely supported and you'll most likely be able to open a JPG file fifty years from now. HEIF? Not so sure.

Tony Northrup's picture

I've never known anyone who edits a jpg and then saves it as a jpg and then reedits the updated jpg. You edit losslessly, like in Lightroom, or you make layers in PS and save as a PSD or TIF for further editing.

JPG is old and outdated but its efficient and you can still do a lot of editing to the files.

Benoit Pigeon's picture

Today, I think most people understand how to use a jpg, but during the first decade of this century, if you knew the catalogue and inserts industry, you would see a lot of that happen. Say you are a distributor and you need an image to represent the product your company sells or will sell soon. What they would do is call the manufacturer and hope to get an image of the product. Sales reps did not always get the best copy to pass on. Either the art department did not understand the request, they did not manage the images properly or the person before them didn't care at all. A lot of art people had poor understanding on how to manage digital images back then. I have seen many times pixels visibly breaking apart in clusters just like in the third image above where the author saves over and over. That and resizing images happened a lot in the past. Who did this?, no clue, I don't know anyone who would either, but it was common to see years ago. Sometimes, images would include a weird partial path that visibly had been used for alterations and showed traces of how much alteration had been done on the image.

Nando Harmsen's picture

You don't know everyone, Tony ;)
There are people who edit JPEG images. There are people who have cameras that don't shoot raw.

EL PIC's picture

Someone above smokes too much dope and talks too much.

VINICIUS YUZO ZUCARELI's picture

Possible flow:
Shoot Jpeg -> edits Jpeg -> uploads to social media -> someone downloads it -> reupload to whatsapp -> geta downloaded.

That is already 5 conversions with HEAVY resolution downscaling using the fastest, not the best, algorithm.

Whatever is the resulting image cannot be printed to a credit card sized image.

Nando Harmsen's picture

That is perfect. In that case the borrowed image can be obtained in high res quality by buying in from me ;)

VINICIUS YUZO ZUCARELI's picture

But unfortunately your work as a photographer may be judged by this image being shown on a heavily satured smartphone screen.

Let’s get very specific on your settings... did you have it set to some default quality of 99%? So that each save cut off more data, not from the act of saving, but because you told it to compress again?

Nando Harmsen's picture

You can see the settings of the JPEG in the screenshot. Maximum quality is used. Even with maximum quality, there will be loss in information. A JPEG image will always be compressed

:facepalm: I didn’t think to zoom. Interesting that it would even reprocess it if it didn’t detect a change.

Nick Rains's picture

It's very simple. RAW is a capture/editing format, TIFF is a editing/delivery format and Jpeg is a delivery format. Use each for it's strengths. Capturing Jpegs is also fine as long as you *really* need the speed (news/sport etc), otherwise shoot raw.

Nothing wrong with Jpegs at all, in fact they are perfect for 'output'. But only as finished images, those not intended to be edited further. ALL of my published work for the past 20 years has been delivered as good quality Jpegs.

Nando Harmsen's picture

True... absolutely true

Deleted Account's picture

Exactly this.

Gion-Andri Derungs's picture

That is nothing new. The degradation of jpeg, while open and save, is well known.

More comments