1 person found this helpful
Dng is using jpeg lossless compression
The spec is vague on what type of jpeg compression is used
"Two Compression tag values are supported:
• Value = 1: Uncompressed data.
• Value = 7: JPEG compressed data, either baseline DCT JPEG, or lossless JPEG compression
If PhotometricInterpretation = 6 (YCbCr) and BitsPerSample = 8/8/8, or if PhotometricInterpretation = 1 (BlackIsZero) and BitsPerSample = 8, then the JPEG variant must be baseline DCT JPEG.
Otherwise, the JPEG variant must be lossless Huffman JPEG. For lossless JPEG, the internal width/length/components in the JPEG stream are not required to match the strip or tile's width/length/components. Only the total sample counts need to match. It is common for CFA images to be encoded with a different width, length or component count to allow the JPEG compression predictors to work across like colors."
It can be interpreted that lossy compression is used for the preview image but it is not clear.
Photometric interpretation can't be YCbCr, because data from sensor are in RGB form (well, there are some rare cases, like Canon sRAW, where data are converted to YCbCr), and bits per sample can't be 8, because raw files have 10, 12, 14 or even 16 bits per sample
For raw files, the compression is lossless JPEG, which is basically Huffman coding.