Pages: [1]   Go Down

Author Topic: Dumb (?) question about file formats  (Read 2781 times)

Stuarte

  • Full Member
  • ***
  • Offline Offline
  • Posts: 128
    • http://
Dumb (?) question about file formats
« on: April 02, 2008, 12:40:16 pm »

Trying to fathom the mysteries of DxO Pro, I've worked on a few RAW files out of my EOS 5D.  The original CR2 file is around 12 MB, the DNG file from DxO is around 40 MB and the TIFF file generated by DxO is around 70 MB.  All of the same original.

In my naivety I thought the RAW file was the whole enchillada straight from the sensor.  So what makes the DNG file so much bigger and the TIFF file even bigger?

In Lightroom the TIFF files generated by DxO looks a little punchier than the DNG file.

Any insights, explanations, tips etc. gratefully received.
Logged

01af

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 296
Dumb (?) question about file formats
« Reply #1 on: April 02, 2008, 01:22:31 pm »

The CR2 file and the DNG file are both raw, so they should be approximately the same size. If the DNG is significantly bigger than the corresponding proprietary raw file then one or more of the following points apply:
(1) the DNG file has a large JPEG preview image embedded, or
(2) the DNG file has the complete original raw file embedded, or
(3) the DNG file has been linearized---which means it's demosaiced and not really raw anymore and thus, bigger, or
(4) the original raw file was compressed but the DNG file isn't.

Demosaiced RGB colour image files are always bigger (about three times bigger) than raw files because they contain interpolated RGB pixels which raw files don't. For each photosite, the raw file contains a red or a green or a blue value while the demosaiced RGB image file contains a red and a green and a blue value. Furthermore, the single values are 12 or 14 bit in the raw format for most cameras, and 16 bit per channel for demosaiced RGB files.

-- Olaf
« Last Edit: April 02, 2008, 01:24:02 pm by 01af »
Logged

Panopeeper

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1805
Dumb (?) question about file formats
« Reply #2 on: April 02, 2008, 01:29:59 pm »

Well, this is not a simple issue. The crossing of several concepts and detail issues are mudding the picture (and the image).

1. The *file format* of CR2, NEF, DNG and TIFF is TIFF. This governs only the coarse structure/organization of the data.

2. The *raw files* (at least the mentioned ones) contain only one value per pixel, while the TIFF file created from the raw contains three values per pixel: R, G and B.

3. The *raw pixel* consists of 8, 12, 14 or 16 bits (the 5D has 12bit depth). The generated TIFF contains 8 or 16 bits per pixel.

4. The image data is *compressed* in many cases. For example the CR2's are *always* compressed. The Nikon raw files (NEFs) can be compressed or uncompresse, depending on a camera setting. The TIFFs can be compressed or uncompressed, and one can choose between several methods of compression.

5. The compression of CR2 files is always lossless. The compression of NEF files can be lossy or lossless, depending on the camera model and on camera setting. The TIFF compressions uased in raw conversion are always lossless.

6. The effectivity of the compression depends on many details. Even if using the same lossless method, different programs yield different file sizes. For example the compression method in CR2 and in DNG is the same, but the DNG converter can afford to make a "finer" compression than the camera. Consequently, if you convert the CR2 files in DNG with the Adobe DNG converter, compressed, the DNG file will be quite much shorter than the CR2.

7. Adobe's DNG converter offers the choice between compressed or uncompressed output. The compressed is obviously shorter, but the uncompressed can be created and process faster. Furthermore, you can ask the converter to incude a smaller or a full size JPEG in the output.

8. The CR2 file always contains a roughly half-size JOEG image, but only a few hundred KB large, - this is ths *preview* PLUS a tiny, uncompressed *thumbnail*, around 1 MB large.

I think that should suffice for the first round.
« Last Edit: April 02, 2008, 01:32:18 pm by Panopeeper »
Logged
Gabor
Pages: [1]   Go Up