Skip to main content
Doe Johns
Inspiring
May 17, 2022
Answered

Using 16-bits per channel when editing old JPEGs

  • May 17, 2022
  • 6 replies
  • 5431 views

I have some old JPEG photos that were shoot about 15 years ago on a consumer-level Canon, and I'm going to retouch them heavily, then save back into JPEG, and as a final step to share them on Web. They won't be printed.

 

Does it mean that while I edit them in Photoshop, it will be better to switch to 16 bits per channel (given that I will use the sRGB color profile, which is quite restrictive), so that 16 bits per channel will help me to avoid appearing different kinds of visual artifacts? (The artifacts like "banding"; the artifacts that appear when you lose some of your colors due to heavily adjustments of hue, saturatation, curves, whatever.)

 

8-bit JPEGs Adjusting them in Photoshop in 16-bit sRGB  Saving them back to 8-bit JPEGs. Is it a good workflow?

 

 

[Typo in subject fixed by moderator as per OP's following post]

 

This topic has been closed for replies.
Correct answer davescm

As others have said, switching an 8 bits/channel file to 16 bits/channel does not gain anything - but neither does it lose anything. Those 256 levels in the original file are just slotted in to 256 distinct levels from the 65,536 available in a 16-bit/channel file. (Actually in Photoshop 16 bit there are 32,769 levels but that doesn't matter here).

 

However, when you then go on to make adjustments then 16bits/channel does have an advantage. In 8 bits/channel each adjustment calculates a new level and that is rounded into one of the 256 available levels. Then the next adjustment does the same and those rounding errors start to add up and you see stepping in the image (or combing in a histogram). By working in 16 bits/channel, values still are rounded but the number of levels means that the errors are much smaller and it takes an awful lot of cumulative adjustments before any become visible (if they ever become visible at all).

 

As an analogy. It's like having a ruler and marking points at 1,2,3, 4, 5 6 ....12 inches. Measuring those points with a second ruler accurate to 1/10 of a millimetre, does not make any difference to the position of those points.

However if you then make a series of calculations that will move those points and say each calculation has to be rounded so that the new position falls on a ruler point, using the 1 inch ruler will mean that after each calculation the result has to be slotted against distinct full inches. Whereas with the second ruler, all adjustments can be slotted into 1/10 of a millimetre steps. Which will be more accurate after several, even small, adjustments? At the end, the final result may be slotted back into the 12 inch ruler steps (the equivalent of exporting as an 8 bit file) but that final rounding done once is better than a series of roundings at each calculation.

 

Dave

 

6 replies

davescm
Community Expert
Community Expert
May 17, 2022

Hi

An update now that I am back in my office. First I checked dither. I do have dither on for the gradient but that is irrelevant as the duplication of the image was after the gradient was applied, so both starting images are identical. However I also checked Color Settings and "Use dither for 8 bit" was checked so I unchecked it and repeated the test.  I still get a difference:

My steps (I've clarified slightly but not changed them)

 

1. Create document 3000px x 2000px 8 bit sRGB

2. Use gradient tool to create a gradient from top left pixel RGB 0,0,0 to bottom right RGB 40,60,25

3. Duplicate the image (using Image duplicate)

4. Convert the duplicate to 16 bit using Image Mode

5. In both documents :

Image > Adustments > Exposure +3.0

Filter > Blur > Gaussian Blur 20px

Image > Adjustments > Exposure -3.0

6. Convert the 16 bit document back to 8 bit using Image Mode

7. Drag the duplicate (now 8 bit) back over the original as a layer, using shift key to align perfectly and set blending mode to difference

 

I then added one more step

8. Add a threshold adjustment layer to highlight where those difference are

 

I agree the differences are small but that is with only three simple changes.

 

I'll add the two files shortly. If I've missed somthing please let me know.

 

Dave

davescm
Community Expert
Community Expert
May 17, 2022
TheDigitalDog
Inspiring
May 17, 2022

Did your test again Dave, from scratch, same results. Subract, Calcluations, everything still shows the same results as I saw with the Granger Rainbow. 

 

Saved TIFFs are here if you wish to look at them:

https://www.dropbox.com/sh/fqo8gpaeujz1zfw/AABC6dhX9aV11XjI35kwCjs0a?dl=0

 

I also converted the results of your tests, two TIFFs to device values in ColorThink Pro, even allowing one to be in 16-bit and the other 8-bit (not converting the higher bit to 8-bit). The differences in images between the two are invisible! We'd need to see a dE above 1 and change and that's not happening, even comparing the differing bit depths after those edits. CTP has x.xx precision here. 

This is a 6000 pixel analysis (using the full sized image would choke CTP). I used Nearest Neighboor to resample 3kx2K to 300x200 pixels. 

--------------------------------------------------

Overall - (60000 colors)
--------------------------------------------------
Average dE: 0.18
Max dE: 1.60
Min dE: 0.00
StdDev dE: 0.32

Best 90% - (53999 colors)
--------------------------------------------------
Average dE: 0.10
Max dE: 0.70
Min dE: 0.00
StdDev dE: 0.21

Worst 10% - (6001 colors)
--------------------------------------------------
Average dE: 0.92
Max dE: 1.60
Min dE: 0.70
StdDev dE: 0.21

--------------------------------------------------

Again, based on my testing and colorimetric values, I see zero reason to convert 8-bit per color data to 16-bit, even using your admittedly good torture test on those gradients. On an actual photo? Even more invisible. 

If I'm doing something wrong in creating your tests or in the analysis of the data, please let me know. 

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"
D Fosse
Community Expert
Community Expert
May 17, 2022

I don't understand how you get these results, or what you're testing.

 

Are you saying you do not get these histograms you see here?

 

This is the result of adjusting an 8 bit file, vs. converting to 16 and doing the same adjustment, then converting back to 8. Note that these are refreshed histograms, not cached.

 

Incidentally, this very same procedure is how an NEC Spectraview or Eizo ColorEdge works. The 8 or 10 bit signal from the video card is converted to 16 bits, run through the calibration tables, then converted back to 10 bits and sent to the panel.

TheDigitalDog
Inspiring
May 17, 2022

I don't understand how you get these results, or what you're testing.

 

I outlined what I've been testing and comparing the data after edits and they are identical. 

I've built Dave's images and edited them as described.

I subtract them, there is no difference. The Histograms are identical. 

There is no difference on my end, editing on 8-bit per color data OR on the 8-bit per color converted to 16-bit per color data. 

But AGAIN, there will be a massive difference in the two IF Dither is on. I do not have that set to be on for a fair test. I've asked, and will ask again, are you guys doing all this with Dither on or off? 

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"
Brad @ Roaring Mouse
Community Expert
Community Expert
May 17, 2022

It really depends on what you want to do. By all means, toggling to 16-bit will give you much more headroom to do new additions, effects, gradations, etc, then export a final new render in 8-bit. It won't help you with the existing 8-bit elements, of course, but if you have a working file in 16-bit, you can do much more extreme levels and curves adjustments on the new 16-bit elements. This is totally acceptable to me as a workflow if that's all you had as source material.

Doe Johns
Doe JohnsAuthor
Inspiring
May 17, 2022
quote

It won't help you with the existing 8-bit elements, of course, but if you have a working file in 16-bit, you can do much more extreme levels and curves adjustments on the new 16-bit elements.

 

But to make different extreme adjustments to 8-bit elements, switching Photoshop to 16 bit per channel won't give me any benefit?

D Fosse
Community Expert
Community Expert
May 17, 2022

If a jpeg is all you have, switching to 16 bit lets you make edits to it without any further damage.

 

And that's the whole point, right? You can't do anything with the existing image quality, but you can prevent further loss. So yes, it makes perfect sense. Convert to 16 bits and resave immediately to PSD or TIFF.

 

Also note that there is a new neural filter that specifically removes jpeg artifacts. I tested it out of curiosity the other day, and it seems remarkably effective. So I'd run that first. It can sometimes remove a tiny bit of genuine detail, so check visually and don't throw away the original.

Michael Bullo
Community Expert
Community Expert
May 17, 2022

In case you aren't already, be sure to save your photos as Photoshop files and work non-destructively...

  • Perform retouching on separate layers
  • Make tone and color changes using separate adjustment layers
  • etc...

Then save out JPEGs.

TheDigitalDog
Inspiring
May 17, 2022

Layers yes. But at some point, that gets flattened and the “non destructive to data” part ends. Unless you only live in Photoshop, the edits are applied. To print. To create/post even as a non layered TIFF. And more so to a JPEG.

Nondestructive while editing, yes. After? No. At least doing all this high bit, the eventual data loss is invisible. Often not possible on 8-bits per color images.

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"
Michael Bullo
Community Expert
Community Expert
May 17, 2022

Agreed. My comment was referring to editing in general. I was recommending against the direct manipulation and saving of JPEGs.

TheDigitalDog
Inspiring
May 17, 2022

It's not 16-bit (high bit) from the get-go, converting to that isn't going to buy you anything. And saving back as JPEG is going to cause even more data loss. IOW, converting to high bit doesn't magically give you more data. 

I'd probably consider doing as much of the editing on layers or in something like Lightroom where you're doing parametric editing but when the rubber meets the road when the edits are applied to the original data, there is going to be data loss. 

 

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"
Doe Johns
Doe JohnsAuthor
Inspiring
May 17, 2022

"Сonverting to that isn't going to buy you anything." - Yes, I do understand that opening an old JPEG in 16 bit won't somehow magically make it look better. What I mean is that it editing it in 16 bit may provide me more "room" to make different errors. Those errors will cause less damage. Or this isn't how things really work?

TheDigitalDog
Inspiring
May 17, 2022

Maybe this will help:

http://digitaldog.net/files/TheHighBitdepthDebate.pdf

You are not making more data or really even numeric padding. 

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"
Doe Johns
Doe JohnsAuthor
Inspiring
May 17, 2022

Sorry for a type in the title.

Doe Johns
Doe JohnsAuthor
Inspiring
May 17, 2022

* typo