13: Formats – JPEG, RAW, TIFF…?

posted in: Photography 101 | 0

You have your digital camera - and you have your pictures that you can view immediately - they're right there on the camera as JPEGs ... or TIFFs ... or maybe RAW...? It depends on how you have your image storage set up for your camera, but what exactly do these terms mean and what is the difference between them?


Digital images are stored, or saved, in a variety of digital "formats" - computer algorithms that dictate how the digital information of the photograph is stored and written to the storage media - and there is a boatload of "formats" out there. Thankfully, most digital camera manufacturers have settled on no more than 3 format options: JPEG, TIFF and RAW. Before we get into the difference between these, let's cover some basics about formats and why there are different types.

Lossy - Lossless - Uncompressed
The biggest difference between the various file formats is the type and amount of "compression" they apply to the images when they are stored. These compression types can be broken down into 3 types - Lossy, Lossless and Uncompressed (OK - uncompressed is not really a type of compression, but let's keep it in the list anyway):

Lossy Compression
Lossy compression algorithms allow some degradation of image quality to provide a smaller stored file size and is typically used for JPEG files. A lossy compression algorithm may achieve this by reducing the color resolution (the actual number of colors in the image) of the image - replacing very similar colors with the same color. With a minimal compression setting, this image degradation may not even be noticeable - but at high compression settings, the result may be noticeable banding in graduated colors and noisy artifacts overall. The amount of degradation can be controlled by selecting an image quality setting on the camera.

Lossless Compression
Lossless compression also reduces the file size, but does so in a way that does not discard any information and does not degrade the image. It achieves this by searching the image for repeating patterns in color, tonality, etc. and creating short abbreviations for each occurrence in the image. This type of compression is not very common in cameras and can even result in a file size that is larger than the uncompressed original.

Uncompressed
Uncompressed files are just what they sound like - no compression is applied to the image to reduce file size, resulting in an image that has all of the information gathered at the time of the exposure.

Why Would I EVER Want To Use Any Compression?
In a perfect world, every photograph taken would be stored at the highest possible level of detail - but there are times when sacrificing a small amount of detail is just a better way to go. Uncompressed files are large, and they eat up a lot of space on the storage card. The large file size also means that it takes the camera longer to write the information to the card, which could result in your camera's buffer "filling up" when shooting bursts of photos, forcing you to wait until it clears before you can take another photograph. (Digital camera use a "buffer", which is built-in memory used to store images while they are being processed and written to the permanent storage card - allowing you to take another picture while the previous one is being processed.) Even minimal compression reduces file size dramatically, and reduces the amount of time needed to write the information to the card, allowing for much longer boosts of photos before filling up the camera's buffer (think photos of your nephew at his soccer game). To get an idea of image quality that a compressed image can retain, keep in mind that all images on this site are JPEG images with a considerable amount of compression.



The image at left was saved as a JPEG with medium compression, while the image at right is a JPEG with high compression. Note the top right corner of the image and how the image on the right is starting to show banding and digital noise.

OK - So What Format To Use:

JPEG (or JPG)
JPEG, an acronym for "Joint Photographic Experts Group", is the most common format used by camera manufacturers for image storage - for some cameras, it's the only format available. JPEG images are created using a lossy compression algorithm, providing the smallest file size for images. The amount of compression can be set by the user (low compression - high quality, high compression - lower quality) along with the physical size of the image in mega-pixels (number of pixels that make up the image). If you're shooting an event, and you know you will never want anything larger than small prints, and you're not overly concerned about image quality, you can set your camera up to save the images as small-size JPEGs with high compression - this will provide the largest number of images that your storage card can store. For more serious photography that you may want to enlarge, and you want the best quality, a large-size JPEG setting at low compression will usually provide more than enough quality. One last note - if you plan to edit an image several times, it is best NOT to use a JPEG format, as the compression is re-applied every time the image is saved. If you plan to edit an image several times, it is best to use a format that uses a lossless compression algorithm (TIFF or PSD, for example) and save copies of each edit as a JPEG for distribution. The file extension for JPEG files is .JPG or .JPEG.

TIFF
TIFF, an acronym for "Tagged Image File Format", is an uncompressed file format that is available on higher-end cameras. The uncompressed nature of this format provides the highest possible quality, but do so by creating files that are quite large. TIFFs may be compressed using a lossless compression algorithm (LZW), but this algorithm is not supported by all editing or display software and is rarely used. LZW-compressed TIFF files may even be LARGER than an uncompressed TIFF. The file extension for TIFF files is .TIF or .TIFF.

RAW
RAW is actually NOT an acronym for anything, although some people like to think of it as Read And Write, being that this format is roughly the equivalent of a digital negative and provides the most post-processing flexibility for image control. The RAW format is not even really a "format" because it differs between camera manufacturers and the algorithms are proprietary, but most RAW algorithms are similar in that they all record minimally processed, typically uncompressed data from the image sensor (some manufacturers allow some compression settings for RAW images). The user then "processes" the image in editing software to create a final image that can be viewed or distributed. Settings that are "locked-in" with other formats such as JPEG or TIFF can be adjusted in a RAW image - white balance, mid-tone settings - even overall exposure to a degree - can be manipulated to a much larger degree. The down-side with RAW images is that they can't really be distributed or view without being processed first, and they, like TIFFs, generate larger file sizes. Common file extensions for RAW files are: .NEF .CR2 .PEF .RAF .ARW and .DNG to name a few. Of these, DNG is worth a mention. DNG, an acronym for Digital Negative, is Adobe's proprietary version of the RAW format and is probably the most universal RAW format available (several camera manufacturers use Adobe's DNG as their native RAW format). Adobe also offers a conversion application that converts most RAW formats to the DNG format that can then be edited using Adobe editing software

File Size
The chart below will give you an idea of formats and file size. These settings are based on an 8 GB storage card and are approximate - for size comparison purposes only.

Image quality
Image size
File size
No. of images
Buffer capacity
TIFF, Uncompressed
-
34 MB
130
15
RAW, Lossless compressed, 12-bit
-
23.4 MB
190
22
RAW, Lossless compressed, 14-bit
-
29.2 MB
147
16
RAW, Compressed, 12-bit
-
20.7 MB
258
27
RAW, Compressed, 14-bit
-
25.4 MB
215
16
JPEG fine (low compression)
Large
Medium
Small
12.4 MB
7.4 MB
3.8 MB
506
853
1600
57
100
100
JPEG normal (medium compression)
Large
Medium
Small
6.2 MB
3.7 MB
1.9 MB
1000
1600
3200
100
100
100
JPEG basic (high compression)
Large
Medium
Small
3.2 MB
1.9 MB
1.0 MB
1900
3200
6300
100
100
100

So, to answer the question of which format to use - it depends on what the images are going to be used for, how many images am I going to be taking, how fast will I be taking them, do I want to e-mail them to someone as soon as I can (and won't have time to process RAW images), etc. There is no one answer for everyone, but my personal preference is to shoot most everything in RAW. My personal system will actually allow me to save a RAW version and a JPEG version of each photograph, which comes in handy if I need to e-mail a quick proof to someone. I typically don't have a need for long bursts of images (especially not more than 6 or so), so I'm not too concerned with filling my camera buffer, and I carry several spare storage cards to handle the larger file sizes.

 

Leave a Reply