Lightroom Classic: Export: Alter Scale of JPEG Compression to reflect 13 discrete steps instead of 0-100

  • 1
  • Idea
  • Updated 7 months ago
  • (Edited)
When exporting JPG, there is a scale from 0 to 100 for JPG quality. The expected output would be a graduated quality loss vs smaller file size when setting lower amounts for JPG quality.

Example: saved from another software a 1 megapixel file has: JPG100 - 825 kB, JPG99 - 732 kB, JPG98 - 607 kB, etc.

The practice shows, the quality 100 has the most details preserved, but the highest file size. However, quality 96 has around the same quality as 100 but lower file size. This way, one can experiment with the JPG file compression values and discover: the values of 92, 96, 98 and 100 has a slight variety in quality loss, but a significant change in file size. When storing hundreds of JPG's size/quality matters.

Problem: Lightroom doesn't care about fine steps :-( Quality 100 equals quality 95... It's the same file size. Digging more deep into the 0...100 scale can be discovered that the 0...100 range is divided into 12 steps, so the quality changes at 100, 92, 83, 75, 67, 58, 50, ...

Probably this was good at the beginning of times (since Photoshop inherited the same, overly simplified scale of 0-12) but today it's not good at all. Especially when Lightroom offers the 0-100 scale for JPG and in fact it uses only a 0-12 scale...

Test: export 1 megapixel JPG's at quality 100, 99, 98, ... etc. Export the same image, in 1 megapixel size to a TIFF, and then use another software to save the TIFF as JPG, again sizes 100, 99, 98, ... The file size differences will be significant.

Note: use a software that removes the EXIF, to see only the image data in files.
I've done an experiment, the files can be seen here: https://drive.google.com/drive/folders/1c8k6_labYZWi_jZjpqj_sdUdYLiHnrKA?usp=sharing
Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes

Posted 7 months ago

  • 1
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
As Jeffery points out:
“0-100” is really “0-12” — Lightroom maps the 101 points in its 0-100 quality scale to only 13 different quality outputs. 
JUST like Photoshop! No problem..... ;-)
(Edited)
Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes
Regardless of who is pointing out 0-100 is 0-12, the scale still doesn't have 101 discrete values. This is the problem.
Please break away from somebody's blog post and see the real problem.
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
It appears to only be a problem for you if you consider how long Adobe has worked this way and the huge user base. Maybe you should use another product if this is such an massive problem for your "Workflow". But again, HOW this works has been explained to you.
Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes
Problem: The JPG compression scale doesn't has the expected resolution of 100 units.
Period.
Now, this isn't working as expected, regardless of:
- what is explained to me,
- Adobe worked this way a long ago,
- how big is the user base.
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
No, 100 and 95 ARE the same. You expect 95 to be different, it isn't. The scale has too much granularity but matches Photoshop's scale. Again, you can tell Adobe what they already know and that they should have a 12 unit scale like they have in Photoshop. Where 12 IS different than 11. 
How this is a problem (that 95 and 100 produce the same results but less than that doesn't) isn't clear. And again, it's been this way since day one; please tell us the dozen's (let alone hundreds or thousands) of LR users who find this a 'problem'. 
You are actually proposing a solution in search of a problem, but again, you now know how it works and you can file a bug report but don't hold your breath seeing a resolution. 
Photo of Tom Mickow

Tom Mickow

  • 514 Posts
  • 210 Reply Likes
Nothing new here.  See Jeffrey Friedl's blog post on the subject - An Analysis of Lightroom JPEG Export Quality Settings.  It's 9+ years old, but still applies.
Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes
I just don't get why it is good to withhold this problem...
First of all, I don't came here to ask about settings or something else. I came here to report a setting in Lightroom that doesn't works as expected.

So, I don't need explanations on how it's working. I know how it's working.

The subject here is: "it's not working as expected".
Photo of Andrew Rodney

Andrew Rodney

  • 1045 Posts
  • 234 Reply Likes
I know you don't understand. You've had your question answered and if you don't like the way Adobe provides the GUI for JPEG, file a feature request (know how?) or a bug report (know how?). 

It works exactly as expected once you learn, as we've provided, how it works. 

Why anyone would need a JPEG setting at 99 vs. 100 even if there were a tiny difference that would be invisible begs a question you can't answer. And it doesn't work that way. So it's all moot. 

You DO need explanations of how it works and you got them. 
You DO need to move on, it isn't going to change, certainly until you and you alone inform Adobe they must fix this for you <g>. 
Again, if the fact that 95-100 produce identical JPEGs in your so called 'workflow', you should consider either not saving JPEGs in LR (do it elsewhere) or find another product. I suspect that will be fine with those of us here, answering your question. 

No, the topic isn't: "JPG quality value is inconsistent - 100 is the same as 95", it's consistent as being the same AND as expected once you learn HOW the product works.Two of us posting here know what's expected thanks to Jeffery's testing. And thus, it's what we expect. That's how it works; two of us are fine with that fact. Enough said. 
(Edited)
Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes
The original post is not a question. No answers needed.

I know, how the product works. It's not the expected behavior.

Software isn't carved in stone, it can be changed.

Please read my original post, as well, please analyze the samples I provided see how the file size decreases as the quality changes. Why would one use 99 instead of 100? Because it's 10% less storage, but not 10% loss of image information.

By definition, the JPG compression level is on a 0-100 scale with steps of 1. Not with steps of 12 - in Lightroom the granularity is too big - PROBLEM.

I don't need to find another product.

I always use TIFF, not JPG. But there are countless cases when high quality JPG files are needed.
Photo of Andrew Rodney

Andrew Rodney

  • 1045 Posts
  • 234 Reply Likes
If there's a problem here, it's uninformed expectations of how things actually operate (and why).

You of course now know how the values in LR work and that 93-100 are the same and it's questionable if you even need that high a value for most work IF size is more important than visual quality. That 0-12 in Photoshop is 'roughly' the same granularity and there's NO reason for more granulator options (93 vs. 94. vs. 95 etc). That you expect there to be a difference anyone should even colorimetrically detect between JPEG 98 and 99 shows a lack of understanding about JPEG compression. 

My car has a speedometer that goes from zero to 130MPH. First, I don't believe my car can go 130MPH and it's dangerous and illegal to do so! But further, there are NOT 130 tick marks on the speedometer, nor do I expect to see 130 different tick marks which would make viewing it very difficult, nor do I expect it to be accurate to 1 MPH from subsequent values shown. 

The Photoshop Histogram shows us 0-255 tick makes for each level. Even if I'm working in 16-bit data which has 65,536 distinct values/levels. NO one needs that granularity and if it were provided, the GUI for the Histogram would be larger than most users displays! So we don't see each 65 thousand levels; so what? 

You can complain that the GUI shows 100 steps when there are only 12; fine. I can illustrate DOZENS of software products that are not from Adobe that produce exactly the same GUI "lie" if you will. In a prefect world, a slider of field that allows 99 vs. 100 would produce a difference that can be detected. This isn't a prefect world. Better, LEARN how the products actually work and get on with your life using them. Two of us tried to explain, thanks to Jeffery's fine blog, how LR actually works. Now set it as you desire understanding what will really happen. 

This has turned into a CWOBaT (colossal waste of bandwidth and time). But you got the answer to your question. 

I always use TIFF, not JPG. But there are countless cases when high quality JPG files are needed.

You always use TIFF not JPEG so your rant is even more CWOBaT. And no, there are not countless cases you suggest as there IS a high (highest) quality JPEG setting in LR, the group of value you now (?) know to select when you'll never use them. 

Or you now want a value of 101? You're not to be taken seriously any longer. Move on. 

Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes
This post has been turned into CWOBaT.
Yes.
Tons of off-topic text not related to the original subject.
Photo of John R. Ellis

John R. Ellis, Champion

  • 5134 Posts
  • 1458 Reply Likes
Jozsef,

It appears you are calling attention to two separable issues:

- You'd like more than 13 levels of quality.

- LR's scale of 0-100 is misleading, implying that there are 101 levels when in fact there are just 13.

Can you provide detailed examples as to why you'd like more than 13 levels?  Adobe is more likely to pay attention to feature requests that explain the situations in which the feature could be useful, especially if they think many other users will encounter the same situations.
Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes
Yes, then there are 2 issues, one is the 13-level quality in Photoshp and then the 101 vs 13 levels in Lightroom.

The main reason I started this thread is this: JPG compression levels from 90 to 100 are the most important when trying to find the lowest file size and having the highest image quality. For compression factors under 90 the JPG artifacts become gradually more visible.

Please see the files that can be downloaded from the Google Drive link I provided. The files beginning with 'FS' are compressed with levels ranging from 85 to 100. Please pay attention to this:
- FS IMG_7320 100.jpg - 826 kB
- FS IMG_7320 99.jpg - 733 kB == 93 kB economy, 88.7%
- FS IMG_7320 98.jpg - 608 kB == 218 kB economy, 73.6%
- FS IMG_7320 97.jpg - 536 kB == 290 kB economy, 64.9%
- FS IMG_7320 96.jpg - 478 kB == 348 kB economy, 57.9%
- FS IMG_7320 95.jpg - 431 kB == 395 kB economy, 52.2%
- FS IMG_7320 94.jpg - 939 kB == 433 kB economy, 47.6%
- FS IMG_7320 93.jpg - 360 kB == 466 kB economy, 43.6%
- FS IMG_7320 92.jpg - 333 kB == 493 kB economy, 40.3%

What's the main point here?
Many tests show that in case of photos, the quality change is imperceptible when saving the JPG with 100 or, saving with values around 96. But, the file size decreases drastically.

Saving one JPG doesn't make difference at all. But saving thousands of JPG's does count in different scenarios, especially when talking about storage costs or transfer speeds.

Final thoughts:
JPG Q100 = highest file size, imperceptible artifacts.
JPG Q96 = almost half size, imperceptible artifacts.
JPG Q92 = slightly more than half size, perceptible artifacts.

The best thing would be to allow the user to fine tune the quality from 90 to 100 to have maximum control over file size and quality loss.
Currently, with the 13-step scale, only the 100, 92, 83, 75, etc. values may be chosen.

So the main point of reporting this issue is: be able to significantly reduce the file size, without significantly increase the JPG artifacts.
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
JPG compression levels from 90 to 100 are the most important when trying to find the lowest file size and having the highest image quality. 
In what software product did you test this which has a setting ranging from 90-100? 
What was the average deltaE difference on a test image between settings 99 and 100? 
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
What was the average deltaE difference on a test image between settings 99 and 100? 

Graphic Converter has a scale for JPEG running to 100. 
Take a test target with 567 solid unique color patches. 
Convert to JPEG with setting at 100...
Convert to JPEG with setting at 99...

dE Report
Number of Samples: 567

Delta-E Formula dE2000

Overall - (567 colors)
----------------------------
Average dE:   0.65
-----------------------------
Anything below a dE of 1.0 is INVISIBLE.
Take away: colorimetrically there is absolutely no reason to convert at 100 vs. 99; they are visually identical. 

EDIT. Tried this test using Affinty Photo which has a JPEG slider going 0-100. This gets real good when I export at JPEG quality 100 vs. 95. The deltaE for EVERY pixel is 0.00. 
Behaves just like Lightroom! But not an Adobe product of course. The horrors.....
(Edited)
Photo of Yves Crausaz

Yves Crausaz

  • 754 Posts
  • 107 Reply Likes
Bof, ce que je vois, quand on a envie de faire mal à une mouche, on lui enfile une paille dans le cul...

Oh well, what I see, when they want to be painful a fly, they thread him a straw in the ass...

Photo of Todd Shaner

Todd Shaner, Champion

  • 1966 Posts
  • 665 Reply Likes
This should be helpful. In reality the vast majority of image files will show no compression artifacts at a LR Quality setting of 70-76 (PS 9). The LR settings 85-92 (PS 11) and 93-100 (PS 12) were originally provided in PS and carried over to LR for "experimental" purposes and provide very little if any image improvement and inflate the file size considerably. There is almost never a need to use these settings and would likely be better served using 16 bit TIFF file format.

I do agree that the LR 0-100 Quality scale serves no purpose and requires keeping a table handy such as below when trying different settings. It would make more sense to provide the same PS 0-12 step settings since that's what LR's Quality settings are based on.


* PS Quality level 7 should be avoided

Photo of John R. Ellis

John R. Ellis, Champion

  • 5134 Posts
  • 1458 Reply Likes
Looking at the sample images provided by Jozsef, I compared those produced by the unspecified other program ("FS IMG") with those produced by LR ("IMG"). I used Loupe view in LR at Fit and 2:1 zooms (with Lock Zoom Position), and I tried to find the FS image that best matched a given LR image. I used the cursor keys to flip back and forth between a pair of images, and initially, I hit the cursor key rapidly a random number of times, so I wouldn't know which image I was looking at (a pseudo-blind A/B test).

The most significant artifacts were in the upper part of the blue sky, and less noticeable artifacts were where the trees met the sky.  

My results:



In each row, the FS column shows the FS image that most closely matched the LR image.

LR 93 and 85 were both a little better than FS 100.  Overall by my eye, LR's top four levels (75, 77, 85, 93) span the top four levels of FS (97, 98, 99, 100).  (Someone else's eye will surely get slightly different results.)

Out of curiosity, I googled for tools that would estimate visual similarity, and came up with Butteraugli, "a project that estimates the psychovisual similarity of two images."  The Score column in the table shows the Butteraugli score of the compressed image compared with the uncompressed original. The scores roughly align with my visual judgments. 

Conclusion: At least for this one low-resolution image (1224 x 816), LR provides as much granularity in the upper compression levels as FS, while giving a little bit better image quality for a given file size.


Photo of Todd Shaner

Todd Shaner, Champion

  • 1966 Posts
  • 665 Reply Likes
Conclusion: At least for this one low-resolution image (1224 x 816), LR provides as much granularity in the upper compression levels as FS, while giving a little bit better image quality for a given file size.
The FS JPEG files use 4:2:0 Chroma Subsampling at all Quality settings. LR uses no Chroma Subsampling (4:4:4) until Quality setting 47-53 (PS 6). This allows LR/PS to provide higher image quality than obtainable with the convert app used to create the FS JPEGs. Just an FYI when comparing converters.
(Edited)
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 7587 Posts
  • 1731 Reply Likes
Moving to a Feature request. Compression is working as designed. 
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
Expectations vary among knowledgeable and not as knowledgeable users. 
So do tell us what software you develop so perhaps we, the actual (possible) user can tell if what you've developed works as WE expect..... 
Photo of Jozsef Szasz-Fabian

Jozsef Szasz-Fabian

  • 59 Posts
  • 12 Reply Likes
I do programming of microcontrollers (main profession) and lately I developed management systems in an own PHP framework (eg. MLM system calculus). Both turns out as must-to-be-precise, otherwise the things simply doesn't work.

Photography was a hobby (stock photography) and in the last times I used to teach Photography and Lightroom. Students on the Lightroom sessions pointed out, the compression isn't working as expected...

Long story short.
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
Right, no experience writing for photographers and artists. Understood. 
Students are students and like those who don't (as yet) have been told how LR's JPEG settings actually work, make assumptions. Some of us here have tried to tell a student how it actually works. You can learn this fact or move on, use another product (but I've illustrated a non Adobe product who's JPEG settings mimic LR in the same fashion). You assume 100 tick marks are all different and the facts have been taught to you which you can accept or not; you do NOT get 100 differing results. Deal with it. 
(Edited)
Photo of Robert Somrak

Robert Somrak, Champion

  • 726 Posts
  • 227 Reply Likes
I think the 0-100 slider for 13 steps is another poorly thought out programming decision and I agree that Adobe should have used a 0-12 range in Lightroom if there are only 13 increments of JPG quality and that would have eliminated all this confusion. I also think 13 steps are more than enough and we do not need 100 as the OP suggests. 
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
Exactly. First it's tiny engineering to fix the UI and it matches Photoshop that has a nearly 30 year history. Just FIX the tick marks on the slider. Until then, some know how it actually works.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1966 Posts
  • 665 Reply Likes
To put this into perspective the Adobe PS (and LR) 13 JPEG Quality settings were first established over 20 years ago. From a practical usage standpoint these 13 Quality settings have served users very well with no complaints to date that I'm aware of. For users seeking more JPEG Quality setting granularity Adobe introduced 'Save for Web' in PS about 15 years ago.
'Save for Web' offers a true 100 step Quality setting and a 2-up preview option for comparing different JPEG Quality settings to the original file. With today's higher Web bandwidth and significantly lower storage costs the need to conserve file size is no longer a major issue for most applications. Ironically, starting in PS 2015 Adobe demoted 'Save for Web' to a "legacy" app. To access it now you need to go to File> Export> 'Save for Web (Legacy).' So it is still available for users like yourself who are willing to expend the time to individually analyze each image file at more than 13 Quality setting granularity. More here:
http://blogs.adobe.com/crawlspace/2015/06/save-for-web-in-photoshop-cc-2015.html

https://photography.tutsplus.com/tutorials/save-for-web-better-jpeg-compression-with-adobe-photoshop...
Given that Adobe has demoted 'Save for Web' in PS it's almost certain they will not resurrect and offer it in LR. Your best Adobe option for now is to use LR Edit in PS or Export and then use the PS 'Save for Web' app. This allows real-time preview of the Optimized image next to the Original image to determine the lowest acceptable Quality setting. It also shows you the Original and Optimized File Sizes. It should do everything you are looking for, but just not local to LR.
Photo of Andrew Rodney

Andrew Rodney

  • 1046 Posts
  • 235 Reply Likes
Well I'll be celebrating 30 years of Photoshop use in April. But I don't have the ability to launch Photoshop 1.0.7, and I don't recall if, in those days, saving JPEG differed options than it does today. But I do believe at the time (for me, 1990), I could save a JPEG. Be interesting to find an old screen capture of Photoshop back then with respect to it's Save JPEG settings. None the less, yeah, there have been two, maybe three decades of how PS saves JPEG and I can think of zero reasons LR shouldn't match Photoshop, it's bigger and much older brother. 
Photo of Todd Shaner

Todd Shaner, Champion

  • 1966 Posts
  • 665 Reply Likes
I'm celebrating 25 years using Photoshop starting in 1994 with 3.0. Adobe first introduced layers in 3.0–Wow! The PS 3.0 User Guide on pg. 453 says, "JPEG Image Options Specifies the image quality. Choose an option from the Quality menu, drag the Quality pop-upslider, or enter a value between 0 and 12 in the Quality text box. So the same 13 Quality settings available today were in PS in 1994 and probably earlier. The original JPEG specification was published in 1992 so it's unlikely support would have been available before that date.

Here's what PS 1.0 looked like: https://petapixel.com/2015/02/20/a-blast-from-the-past-demos-of-adobe-photoshop-1-0/