4 Replies Latest reply on Jan 11, 2011 7:22 AM by MadManChan2000

    DNG compression

    David Remington Level 1

      compressed seems to be the default when saving a DNG now. there is a check box for uncompressed but no description of whether the default it is lossless or lossy. there was a compression "lossless" check box in CS3. DNG spec says JPEG compression but mention both lossless and lossy. Does anyone have the straight scoop?

       

      Thanks,

       

      David

        • 1. Re: DNG compression
          Vit Novak Level 3

          Dng is using jpeg lossless compression

          1 person found this helpful
          • 2. Re: DNG compression
            David Remington Level 1

            Thanks Vit.

             

            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.

             

             

            David

            • 3. Re: DNG compression
              Vit Novak Level 3

              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

              • 4. Re: DNG compression
                MadManChan2000 Adobe Employee

                For raw files, the compression is lossless JPEG, which is basically Huffman coding.