Below is a short list of things that spring to mind. Please add your favorites.
- ...JPEGs are 8-bit RGB, and ready for display...
I am curious about this one. I realize that RGB is not the only color space, but are there jpgs that are not 8 bit?
Files coming out of camera having .jpg extension are not RGB files. They use 8-bit Y'CbCr / YUV component coding, Y' being non-linear luminance, Cb being blue-difference chroma component, an Cr being red-difference chroma component.
https://en.wikipedia.org/wiki/YCbCr
On-topic JPEGs, much like raw files, do not contain full color information in each location, that is they use chroma subsampling, like it is explained by
Pointon:
"A 2×2 tile of RGB pixels is matrixed into a luma component Y’ and two color difference components Cb and Cr. Color detail is reduced by subsampling Cb and Cr; providing full luma detail is maintained."
"4:2:2 The 12 bytes of RGB are reduced to 8, effecting 1.5:1 lossy compression"
"4:2:0 The 12 bytes of R’G’B’ are reduced to 6, yielding 2:1 lossy compression."
Subsampling is recorded in JPEG tags SOF0 for baseline coding and SOF2 for progressive coding. To determine which subsampling your camera is using, you can run free exiftool utility like this:
cmd> exiftool -YCbCrSubSampling <filename>
but substitute <filename> with the name of a real file. The result will look like
Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
or
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
etc
JPEG standard supports up to 12 bits.
--
http://www.libraw.org/