Imaging Forensics

Raw vs. TIFF for Digital Camera Capture

Someone from a major law enforcement agency recently asked me for my opinion regarding the best choice between capturing raw or TIFF files from a digital camera. His concern was that the raw workflow is slower, results in duplicate images (the raw original files and the working TIFF files), and that the raw files are proprietary, and therefore different for each camera brand. Please note that this is only about digital camera capture – not about captures from flatbed scanners.

His concerns are all understandable, but I believe there is a simple answer to each of them.

Is the raw workflow really slower? If a raw file is opened using Adobe Camera Raw and adjustments are made to the image, then opened, it is then in Photoshop and ready for additional processing. With a TIFF file, one skips using Camera Raw, but the time spent processing either file is about the same. But, you can also synchronize the Camera Raw adjustments across multiple raw files with a single mouse click, and then use the Image Processor to convert these to TIFF files for working copies. This gives the speed edge to the raw files.

This leads to the issue of creating duplicate files. But, is this a real issue? The original file that is archived needs to remain unchanged – regardless of file format. When working on that image, the analyst may be making adjustment layers, applying smart filters, sizing the image, etc. That file will be saved as a working file – creating a ‘duplicate’ regardless of the original file format. Since the original raw is significantly smaller (requires less storage space) and contains substantially more information than the camera-generated TIFF, the win goes to the raw file again.

Raw files are proprietary. This is true, and has caused problems when camera manufacturers have stopped supporting raw file formats in the past. The solution to this is the DNG file format. This format is a container that can embed the raw file as well as the information needed to open it, thus providing a more universal file format that will last into the future. DNG files can be automatically generated as the files are downloaded from the camera. TIFF files are also fairly universal – although, if they contain proprietary data, such as Photoshop Adjustment Layers or Smart Filters, then they can only be opened by Photoshop, for example, thus making them proprietary as well.

Raw files are also considered to be a ‘digital negative.’ This is because one cannot make adjustments to the raw file and save the adjusted raw file. Instead, the adjustments made to raw files are sets of instructions that exist either as a separate, XML file, or within a database. When the raw file is opened, those adjustments can be disabled and the original image viewed as captured. Although following best practices with any file format will preserve the original captured image, the raw file format is like putting an extra deadbolt (or ten) on the file.

What about image quality? A raw file is high-bit (usually 12 or 14 bits of information) but a camera-generated TIFF file will be automatically converted by the camera (compressed, downsampled) to 8 bits. The raw file has no embedded color balance or color space, but the TIFF has both. These three things (smaller bit depth, embedded color balance, and embedded color space) make it so that the TIFF will lose quality more quickly with image adjustments than the raw file. And, the raw file will contain more tonal values by orders of magnitude. The camera-generated TIFF image is much more like a camera processed JPEG than a raw file. A strong advantage goes to the raw file.

Next, let’s consider the SWGFAST recommendation regarding images of fingerprints being captured and preserved in a lossless file format. The intent of this recommendation is to enable us to get the best capture possible, and preserve the most information, from our equipment, but I think it leads to some misunderstanding.

A TIFF image, that is generated in-camera, is uncompressed, so it meets this recommendation – but it is actually much more like a camera-generated JPEG than like a raw file. There is quite a bit of in-camera processing that has taken place to generate that TIFF as mentioned above. A large amount of the image data is thrown away by the camera when creating the camera-generated TIFF file – these same processes occur when the camera generates a JPEG image! A camera-generated JPEG image at the camera’s highest quality setting will be virtually indistinguishable from a camera-generated TIFF file – except that the TIFF file will be substantially larger.

Why is an 8-bit TIFF file larger than a 12 or 14 bit raw file? The digital camera doesn’t actually record color information. Instead, it records brightness values for each pixel position. The CCD or CMOS chip is covered with red, green, and blue filters, with each filter position following a specific pattern. The raw file simply records the brightness value of each pixel, and later applies the color interpolation only when the image is opened with a raw file converter, such as Adobe Camera Raw. But, the TIFF file has already applied this color interpolation, so each pixel needs to be described as three separate values, or channels. To measure the number of bits needed to store an uncompressed file, just multiply the pixel width by height, times the bit depth, times the number of channels. Although the bit depth of the TIFF file is less, the number of channels is tripled, making an uncompressed TIFF about twice the size as an uncompressed raw file, even though the raw file contains much more information, and will hold up to a significantly higher amount of image processing.

This leads to the question of whether a JPEG file is really as bad as we have been led to believe. I’ll address that issue in a future post – but I personally prefer a raw workflow and think that the benefits of shooting raw are significant, and that there is no real cost.

Categories : Blog, Fingerprints, Photography