Robertl594 wrote:
JPEGs are 8 bit lossy format. This means that there are 256 tonal values per channel (compared to 4,096 tonal values of RAW images) ...
You are on the right track but your numbers are not right.
A color JPEG does indeed contain 256 possible tonal values (2^8) values for each channel but since there are three channels that translates to 16,777,216 color values (2^24). The same is true for an 8-bit TIFF except that it is not compressed.
But a TIFF can also be 16-bit with 2^16=65,536 values per channel. If a TIFF contains three color channels it means that there are 48 bits in a pixel and 2^48=281,474,496,710,656 possible color values.
The odds of being able to distinguish the difference between two colors that are very close in value is practically zero.
A 14-bit raw file has no colors in the recorded pixel values, only luminance. That's 2^14=16,384 possible tonal values. But in this case, values lower than about 64 are almost impossible to distinguish from black because the raw values follow an arith
metic sequence whereas the image values represent a logarithmic sequence. The also means that the highest values are also almost impossible to distinguish in the raw file but you can make them out once they get turned into logarithms. Nevertheless, it's almost impossible to detect color in the darkest or brightest tones which just look black or white.
What makes the JPEG go bad is that all of the numbers are stored as
integers. When you open a JPPG to edit it, the 8-bit values get converted to 16- or 32-bit values in the computer. They can be treated like floating point values during editing. You can manipulate the colors and tones without seeing any damage. But when you finally save the results, they all get returned to their 8-bit representation, in effect, rounding the values off. You may not notice the damage until you reopen the JPEG and do more tone and color editing and save again. Pretty soon you will start to see banding. It's the rounding, not the JPEG compression, that does the damage.
The remedy is to always start from the raw file or the same original JPEG or TIFF rendition of the image. Never reopen an edited image to do additional editing.