• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
6

JPG Quality Degradation From Exporting

Engaged ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

  1.  QUESTIONS FOR THE COMMUNITY

Please let me know what you think of these 4 points:  Quality degradation and Raw files will be covered in a later post.

 

1) JPG Quality IS degraded in Photoshop by opening the file and exporting it as a JPG

Based on the description below, it seems that a JPG file quality will degrade if you open it in Photoshop and then export it as a JPG even if you do NOT make any adjustments to it.  This is because both 1) Color information subsampling and 2) quantization: are performed when you export it which reduces the image quality.
Every time you perform this process, you cause further degradation, the effect of which is cumulative.

Technically you are not saving information to the same JPG but you are either: a) Overwriting it if you choose the same file at the end of this process, or 2) Creating a new JPG file if you give it a different name.  No further steps are required.

 

2) JPG Quality is degraded as much in Lightroom by opening the file and “saving” it

It seems that a JPG file quality will degrade as much in Lightroom.  Why? You open it in Lightroom, make edits to it, and then export it as a JPG.  This is required for the edits can be applied to the image so that it can be posted on the web or shared with a different person (what is meant by “saving it” in the title).

 

Even if you do NOT make any adjustments to the file, quality will degrade when you perform the export process.  This is because both 1) Color information subsampling and 2) quantization: are performed which reduces the image quality.

 

3) JPG Quality will NOT degrade as much in Lightroom as long as you do NOT export the file

The JPG file quality will NOT degrade as much as Photoshop as long as you do not perform the export step.  This enables you to experiment with many different adjustments and see them on the screen without reducing the image quality.  This is what is meant by “Parametric editor” as described below.

However, you cannot post the file t the web and have the changes appear.  Sharing it with a person who has the same version of Lightroom as you do will enable them to see the changes.

 

4) Conclusion

It is the act of exporting that causes the quality degradation.  The effects are cumulative.

 

5) File Manager

Opening a JPG file and then closing it again in File Manager will NOT degrade the file.  This is because File Explorer does NOT cause se both 1) Color information subsampling and 2) quantization: to be performed.

 

 

 

I was told that JPGs will degrade in quality as a result of being edited.  I wanted to make sure I understand how and when, and what can be done to prevent it. 

Request: please review the following and let me know if you disagree with anything or want to add something.  The information was taken directly from this excellent article by Rahul Nanwani: https://imagekit.io/blog/jpeg-image-degradation/#:~:text=JPEG%20degradation%20occurs%20due%20to,JPEG....

 

  1.  PREVENT QUALITY DEGRADATION
  • Tif Master File:
    If you are going to perform multiple edits to a JPG image or share it with other people who may edit it, after you open it you should save it as a 16-bit TIF (open source and widely supported) and send that to other people who may edit it.  When you have finished all the edits then you can save it as the final JPG.
  • Parametric Editing:
    Both Lightroom and Adobe Camera Raw convert your editing adjustments into “instructions” (metadata) located in the Lightroom Catalog.  This is called a “Parametric Editor”. You see a preview of the image based on the instructions in the metadata.  You can change the instructions as many times as you want without reducing the quality of the image.  The Color Information Subsampling and Quantization (discussed below) are not performed until you export the image from Lightroom which creates a new JPG file.
    However, the instructions written to the metadata in the file usually require Lightroom to be read.  Therefore, if you want to share the file with the edits shown with other people or post them to the web, then you have to export the file using Lightroom and create a new JPG file.
    Edit Multiple Images: Parametric Editing enables you to edit multiple images at once (you can instantly sync all of your settings with the other images), which is not something you can do in Photoshop. A Photoshop workaround is to use an Automation/Batch or Script/Image processor applied to an action.  With Parametric Editors, you can save your settings from one image as a preset which can then be applied to other images without having to redo any of the work.
    Photoshop: In contrast, Photoshop adjusts the actual pixels and, therefore, is a destructive “Pixel Editor”. When you save the image by exporting it as a JPEG or other file type, the Camera Raw instructions are actually applied to the pixels in the image, not in the metadata (as with Lightroom).
    There are ways you can work non-destructively in Photoshop such as: 1) using layers, 2) adjustments layers, 3) Smart Objects, 4) duplicating an image, and more.

 

When you edit an image by creating instructions for adjustments (Parametric and non-destructive) rather than adjusting the actual pixels (destructive) you are working parametrically. This is the way that camera raw images are edited, and is now used with other file types.

 

 

III.  HOW & WHEN DEGRADATION OCCURS

The JPG format is a “lossy” compression format as described below: 

 

1) COLOR INFORMATION SUBSAMPLING:
The algorithm reduces the amount of data needed to represent the color information in an image (subsampling), while keeping brightness information intact. This is an effective way to save space without significantly affecting perceived image quality.  Chrominance Downsampling: The process involves grouping neighboring pixels into blocks, often in 2x2 configurations, where four pixels are treated as a single unit. The color values in the Cb and Cr channels are averaged within each block to calculate a single representative color value.  This averaged value is then used to replace the original chrominance values for all four pixels in the block.  Only a quarter of the original color data is retained. Consequently, the size of the image is halved in terms of the chrominance information.

 

  • Cumulative: EACH time the file is edited the Color Information Subsampling occurs and the reduction in color information is cumulative
    Result: With each uncompression, edit, and recompression, the accuracy and fidelity of the color representation of the image is reduced. As a result, color information becomes increasingly distorted and less faithful to the original.  These effects can be seen as various visual artifacts:
  • blocky color transitions
  • color fringing, and
  • color bleeding along edges.

These become even more noticeable when compressing images with fine color gradients or subtle color transitions. These regions that rely on precise color information suffer from noticeable artifacts where blocky or pixelated patterns disrupt the smoothness of color transitions.

 

 

2) QUANTIZATION:
Uses complex mathematics to round off frequency values to bring them close to whole numbers, meaning now you need fewer bits to represent the image.  It is done using a mathematical transformation – The Discrete Cosine Transform (DCT).
By dividing these DCT coefficients by a set of quantization tables (one for luminance, and another for chrominance), you can decide how much detail to retain and how much to discard.
Photoshop’s “Quality” Slider. I believe this is what Photoshop quality slider does when you export an image as a JPG.

 

  • Cumulative: Just as with Color Information Subsampling, EACH time the file is edited the quantization occurs again, amplifying the impact of quantization-induced degradation.
    Results:
    When images are enlarged, the loss of fine details due to quantization becomes more pronounced, leading to pixelation and blurriness. Edits, such as adjusting brightness, contrast, or colors, cause further data manipulation that can accentuate the existing artifacts caused by quantization. Additionally, text or sharp edges in the image may suffer from unevenness or irregularities as a result of lost high-frequency information.

 

 

TOPICS
macOS , Windows

Views

214

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

That's a lot to react to, and I won't even try. Quality of a JPG is indeed decreased if you export from Lightroom Classic or save from Photoshop, or save from any other program. Opening the file in any program does NOT cause a decrease in the quality of the image.

 

JPG Quality will NOT degrade as much in Lightroom as long as you do NOT export the file

 

If you don't export the file from LrC as JPG, or if you don't save the file from other programs as JPG, there is ZERO degradation of the image.

 

4) Conclusion

It is the act of exporting that causes the quality degradation.  The effects are cumulative.

 

Talking about LrC, if you edit a JPG in LrC, then export, the quality of the exported JPG has degraded. If you return to the original image in LrC and do more editing in LrC in addition to the first set of edits and then export as JPG, there is no cumulative effect because of the first export. The only degradation is due to the second export.

 

However, other programs such as Photoshop and Photoshop Elements will have cumulative degradation if you do it this way: open JPG, edit JPG, save JPG, open saved JPG, edit saved JPG, save another JPG. However, if you do it this way: open JPG, edit JPG, save JPG, open original JPG (not the saved JPG), edit original JPG, save another JPG with new edits, then there is no cumulative degradation, only the degradation of the final save. And all this ignoress the possibility of using PS or PSE to store layers with the original image and layers with individual edits... in which case degradation is only on the final export and not cumulative.

 

Quality degradation and Raw files will be covered in a later post.

 

Ok, I'm looking forward to seeing that, because as far as I know, RAW files do not degrade, so I'm expecting the later post to be extremely brief.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

dj_paige:

This is the quality answer I was looking for. Thank you.

You wrote:

“Talking about LrC, if you edit a JPG in LrC, then export, the quality of the exported JPG has degraded. If you return to this image in LrC and do more editing and then export, there is no cumulative effect because of the first export. The only degradation is due to the current export.”

 

When I say the effect is “cumulative” I thought that meant in relation to the original JPG image.  In LrC, Every time you open a JPG and do further edits to it and export that JPG, the quality has suffered additional degradation in relation to the original file.

  • Degradation #1: Original File make edits – Export and create file #2
  • Degradation #2: Open File #2 make edits – export and create file #3
  • Degradation #3: Open File #3 make edits – export and create file #4
  • Degradation #4: Open File #4 make edits – export and create file #5

 

The degradation from the original file to file #5 is cumulative.

Does that make sense to you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

As intended, nobody would suffer the "cumulative" impact you describe from #1 to #5. 

#1 camera JPG original: you make some edits in relation to that and export file #2 - not reimported

#1 still remains in the catalog, you further adjust the same edits, export file #3 - not reimported

... and so on.

 

#1 receives no change whatever during this. It is a first-generation JPG saved after in-camera processing.

#2 is a second-generation JPG save, based on #1 with re-processing applied

#3 is also a second-generation JPG save, also based on #1 but now with different re-processing

and so on.

 

When it comes to Raw, things step back a generation.

 

If #0 (a Raw) is imported instead of #1 (a camera JPG) then export #2 is a first-generation JPG save. And export #2 is also a first-generation JPG save. There has been only one JPG encoding ever in their processing histories, and there has been NO re-processing of the cumulatively degrading kind you describe. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

Richard:
Thank you for your comments.  As you can see from D Fosse’s reply below, many people refer to JPG quality loss as being cumulative.  The purpose of my workflow was to illustrate the workflow that would result in cumulative quality degradation to help my understanding and those who are starting their Lightroom and Photoshop journey.  This is the workflow that should NOT be used.  Hopefully, this can help other members identify what they are doing wrong if they are using the workflow I described.

Your workflow illustrates how to minimize the degradation by always returning to the original JPG.  Also, by not choosing “Add to this Catalog” you avoid unnecessarily increasing the size of our catalog.  This is another helpful suggestion. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

@KostFan2  You're overthinking this. I also think you should try to condense your posts and clarify the actual question.

 

There is only one way to avoid jpeg degradation: don't use it. To minimize the damage if a jpeg is all you have, resave it immediately to a non-destructive format.

 

A file format is a storage container. It's not something that is built into the file. When open, the file doesn't have a file format.

 

The jpeg degradation happens when the file is encoded and compressed for storage - when saving/exporting. When the file is reopened, it is decompressed and decoded - but for jpeg, the damage is already done, so it doesn't return to its full original state.

 

That's why jpeg degradation is cumulative and non-reversible.

 

LrC doesn't resave the file while working, so no degradation until you export.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 02, 2024 Feb 02, 2024

Copy link to clipboard

Copied

@D Fosse Thank you for setting a good example for me to follow.  my other posts will be shorter.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 03, 2024 Feb 03, 2024

Copy link to clipboard

Copied

LATEST
quote

dj_paige:

This is the quality answer I was looking for. Thank you.

You wrote:

“Talking about LrC, if you edit a JPG in LrC, then export, the quality of the exported JPG has degraded. If you return to this image in LrC and do more editing and then export, there is no cumulative effect because of the first export. The only degradation is due to the current export.”

 

When I say the effect is “cumulative” I thought that meant in relation to the original JPG image.  In LrC, Every time you open a JPG and do further edits to it and export that JPG, the quality has suffered additional degradation in relation to the original file.

  • Degradation #1: Original File make edits – Export and create file #2
  • Degradation #2: Open File #2 make edits – export and create file #3
  • Degradation #3: Open File #3 make edits – export and create file #4
  • Degradation #4: Open File #4 make edits – export and create file #5

 

The degradation from the original file to file #5 is cumulative.

Does that make sense to you?


By @KostFan2

 

Others have addressed this; but this is not the intended workflow when using Lightroom Classic. And as such, it is easy to avoid having this cumulative degradation by using the proper workflow where you constantly work with the ORIGINAL photo, and not by opening exports and working more on these LrC exported files. This is one of the major benefits of the so-called "non-destructive" workflow which is implemented in LrC.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines