Despite several attempts to replace it over the past decade, JPEG (pronounced Jay Peg) remains the universal file format for digital imaging. Not only is it used by all digital cameras (including camcorders and cameraphones) for image capture, it’s also the universal file format for sharing digital pictures online, both in websites and via emails. JPEG files can also be displayed on all computer monitors and most TV sets and printed by all photo printers. Virtually any software application that can handle digital images is JPEG compatible.
Two other file formats are also offered in DSLR cameras: raw and TIFF (Tagged image File Format), although the latter is becoming increasingly rare. Each of these has its own advantages and, although the default setting in all DSLRs is for JPEG capture, there may be times when one of the other file formats is a better option. In this chapter we’ll look at the advantages and disadvantages of the three most popular file formats and consider why digital photographers should consider other file formats.
More sophisticated DSLR cameras provide a wide range of file size and compression level choices. Recent cameras have added a ‘small RAW’ (sRAW) format, which records raw files with a smaller image size.
How Cameras Record JPEGs
When you capture JPEG files, the camera’s microprocessor converts the raw image data into RGB pixel values (a process known as demosaicing) then applies white balance, saturation, sharpening and other adjustments according to pre-determined formulae. These settings are effectively locked into the image file. The camera’s on-board microprocessor then compresses the image and down-samples it from 12 bits of information per pixel (which is captured by the camera) to 8 bits.
JPEG compression works by dividing the image into small blocks and discarding data that is unlikely to be missed by the human eye. And this is the main downside of the JPEG format: image data is lost. The more the image is compressed (by adjusting the Quality setting), the more information is discarded. This ‘lost’ data can never be recovered; hence JPEG is a ‘lossy’ file format.
The actual size of a JPEG file depends on the complexity of the subject that has been photographed. Shots containing large areas of blue sky can tolerate a higher degree of compression so they can be two to three times smaller than pictures of detailed subjects – even though they might have originally been the same size as uncompressed files.
A typical digital photograph, captured in JPEG format. (Source: Canon)
Progressive enlargements of a small section containing detail shows the blocky structure that results from JPEG compression. (The image on the top is a 1095 x 789 pixel, 274-kilobyte file, while the enlargement on the bottom is a 1093 x 790 pixel, 206-kilobyte file.)
If we take a similar-sized enlargement from part of the image with little detail, the file size is reduced to 120 kilobytes, showing the influence the amount of detail has on the JPEG file sizes.
One of the advantages of the JPEG format is that the degree of compression is easily adjustable. Almost all digital cameras provide at least two compression levels in the image ‘Quality’ setting; typically designated ‘Fine’ and ‘Normal’. The image ‘Size’ setting has nothing to do with the JPEG format. It simply determines the size of the pixel array that makes up the image. It, too, is adjustable in most cameras.
When to Shoot JPEGs
Novice photographers – and photographers who have no interest in editing their digital photographs – should generally leave their cameras set to capture JPEGs. However, to take advantage of the high resolution and quality of the camera’s sensor and image processing system it is pointless to shoot with anything other than the cameras highest resolution and quality settings.
Always shoot with the image size on Large and the quality setting on Fine (or Super-Fine if the camera offers it). It’s easy to reduce the size of image files post-capture if you want to send them in emails or post them on the Web. However, it is impossible to put back image data that wasn’t recorded in the first place because the camera was set on Small size and Normal (or Basic) compression.
JPEGs are the best starting point for images that are destined exclusively for use on websites and in emails as other types of image files must be converted to JPEGs before they can be posted online. Many panorama stitching programs can only be used with JPEGs. It is also unlikely that anybody could see much difference between images shot as JPEGs and those captured in other file formats unless the shots covered an extended brightness range and/or unless they were enlarged considerably.
Raw files contain the image data as it is captured by the camera’s sensor with only minimal processing applied. Many photographers liken them to ‘digital negatives’ because they must be processed on a computer using special software to yield optimal results. They’re quite different from JPEG images and have significant advantages for serious photographers.
When you shoot raw files, all of the information recorded by each photosite is used by the camera’s image processor to create the digital image. Nothing is discarded, even when the image processor compresses the raw file to make it smaller. The compression is ‘lossless’ which means all of the image data is retained – and usable by the photographer for subsequent editing.
All raw files require subsequent editing so, unless you are prepared to edit your digital images, there is no point in shooting raw files. Editing raw files is a two-stage process. The files must first be converted into an editable format (either JPEG or TIFF). They can then be fine-tuned with image editing software for subsequent printing. (See Printing Digital Photos for more information on this topic.)
A good raw file converter will integrate effectively with your workflow – and your favourite editing software. This integration should include a raw file browser and the ability to apply settings from one image to a group of other images.
An effective raw file processor provides a full set of parameter adjustments and integrates well with your image editing software.
Raw File Advantages
In contrast to JPEGS, raw files are information-rich. Each raw file will contain the maximum bit depth the camera can record. In effect, this gives you at least three times the amount of digital information that is recorded in a JPEG file – and three times the latitude for making adjustments to brightness, contrast and colour levels before any processing artefacts become visible.
You can correct errors in exposure, adjust brightness levels to ensure both highlights and shadows contain detail, remove colour casts and, generally, make your digital photograph look as much like the original scene you photographed without losing any of the fine tonal nuances that make the difference between an excellent digital picture and a poor one.
Shooting raw files allows you to take control of the white balance, saturation, sharpening and contrast adjustments during the conversion process. And, because it is done on your own computer, you have much more processing power at your fingertips than the camera can possibly provide.
Most raw converters allow you to recover highlight detail in images that have been overexposed by up to one stop. In contrast, there’s not much you can do with an overexposed JPEG image. If no highlight detail was captured, no amount of editing can bring it back. In the case of under-exposure, most raw converters provide a similar latitude for detail recovery and the resulting image should not be excessively noise affected. In contrast, recovering shadow detail from an under-exposed JPEG usually results in visible shadow noise.
Finally, you can output the image as a 16-bit TIFF file, which gives you a robust platform for further editing.
Raw File Disadvantages
The main problem with raw files is that they are proprietary. Not only is Canon’s format different from Nikon’s, Olympus’s and Sony’s and everyone else’s, but raw formats may also vary from model to model within a manufacturer’s range. Consequently, photographers who plan to shoot raw files must make sure any raw conversion software or image-editing application they buy supports the raw images from the camera(s) they plan to use.
All cameras that support raw file capture are supplied with a software disk containing software for converting raw files into JPEG or TIFF files. The capabilities of the software bundle vary widely between different manufacturers. Some provide a wider range of adjustments than others and some have more intuitive user interfaces. Some include basic editing software, while others don’t.
Raw files are very large, relative to JPEG files. This 3740 x 2494 pixel image has a file size of 53.4 megabytes, compared with 4.98 megabytes for the JPEG file of the same shot.
Raw files are also relatively large. For a 10-megapixel camera, file sizes range from approximately 9MB to 30MB (depending on the amount of detail in the shot and the degree of compression the camera applies), compared with 3MB to 5MB for a high-quality JPEG. This means you can store fewer images on a card and it will usually take longer to transfer image files to your computer. It may also reduce the continuous shooting capacity of your camera as the buffer memory will fill up sooner.
Having to convert your images from raw to an editable format (JPEG or TIFF) adds an extra step to your workflow. If this is irksome to you, you’re probably better off shooting JPEGs – especially if you don’t print your
shots any larger than A4 size.
A bit is the smallest unit of measurement for digital data. Bit depth refers to the number of colours that can be displayed by a digital device. The higher the bit depth, the more colours used in the image and, consequently, the larger the file size.
JPEG images are always recorded with 8-bit depth. This means the files can record 256 (28) levels of red, green and blue. Cameras that support raw file capture offer higher bit depths, usually ranging from 12 to16 bits. A 12-bit image file can record 4096 levels of each of the three colour channels, while a 16-bit image file can cover 65,536 discrete levels of red, green and blue information.
The main reason bit depth is important to digital photographers is that images with higher bit depth give you so much more data to work with when the image is edited than 8-bit JPEGs. Consequently, you can make a wider range of adjustments without compromising picture quality. If you don’t plan to edit your digital photos and print them to poster size, the ability to work with high-bit images is irrelevant; you might just as well stick with JPEG files.
Even if your camera doesn’t include TIFF as a capture option, you will probably convert your raw files into TIFF format for subsequent editing. The advantages of the TIFF format are few – but significant:
1. Like raw files, they can contain all the pixel data that makes up the image. This provides much more editing flexibility than JPEGs.
2. Like JPEGs they can be ‘read’ and manipulated in almost all editing software and printed on almost every printer.
However, TIFF files have a couple of disadvantages. For starters, they are usually very large. A 16-bit TIFF file from a 10-megapixel DSLR camera can contain more than 60MB of image data. This makes them unusable in web-based situations and too large to send via emails. TIFF files also contain adjustments applied by the image processing system in the camera (in the case of cameras that include TIFF capture) or in the editing software. These adjustments may not be appropriate for your requirements and will, therefore, need to be over-ridden, which can compromise picture quality.
The following websites provide additional information on the topics covered in this article.
www.photoreview.com.au/ contains several articles on file formats.
en.wikipedia.org/wiki/Graphics_file_format provides an overview of file formats plus information on image file compression.
www.adobe.com/products/dng/ has information on the ‘universal’ Digital Negative raw file format and its advantages to photographers.
www.luminous-landscape.com/tutorials/bit-depth.shtml has an easy-to-understand tutorial on bit depth and its relevance to DSLR photography.
Canon. Advanced Simplicity. Visit canon.com.au for more details.