A Short Course Book
Digital Photography Workflow

Image Formats

 
 
Click to explore the differences between JPEG and RAW formats.
 
 
The DNG logo.
 
 
 
The almost universally recognized icon for image quality.
 
 
Click to see the effects of compression.
 
 
Here, two versions of the same image. The image on top is the original JPEG. The one on the bottom shows what happens after it's saved a few times at the lowest quality setting. Art courtesy of webweaver.nu.
 
One of the most important workflow related decisions you make when capturing images is which image file format to use. All cameras let you use the JPEG format but many also let you use a higher-quality RAW format. A few cameras also offer alternate formats including TIFF and DNG.

Formats

Since many digital cameras offer more than one image format, here are some things that might help you select the best one for your needs.
  • JPEG is the default format used by almost every digital camera ever made. Named after its developer, the Joint Photographic Experts Group (and pronounced "jay-peg") this format often lets you specify both image size and compression. At the moment you capture an image in this format a processing chip in your camera manipulates it based on the camera settings you used, and then compresses it to reduce its size. The changes made to the image cannot be undone later because it's the final, altered image that is saved in the image file. Some of the original image data is lost for good.
  • RAW is a format that's available on many cameras, especially SLRs. One of Ansel Adam's better know expressions, drawn from his early experiences as a concert pianist, was "The negative is the score, the print is the performance". In digital photography, the image file is your score and your photo-editing program is where you perform. For the highest possible quality, you want to start with the best possible score—a RAW image file. These files contain all of the image data captured by the camera's image sensor without it being processed or adjusted in any way. This lets you move the images to the computer and interpret this data the way you want to instead of having the camera do it for you. When you want total control over exposure, white balance, and other settings, this is the format to use because only four camera settings permanently affect a RAW image— the aperture, shutter speed, ISO, and focus. Other camera settings are saved as metadata and affect the appearance of the thumbnail or preview images but not the RAW image itself.

With many cameras you can capture RAW images by themselves or with a companion JPEG image that gives you an identical high quality RAW file and a smaller, more easily distributable image file. Both the RAW and JPEG files have the same names but different extensions. The latest applications such as Lightroom have made working with RAW images so easy this is no longer really useful and the duplicate JPEG images just take up room.

One thing to keep in mind is that RAW images are not always noticeably better. Where they shine is when you have exposure or white balance problems. Because RAW images have dramatically more information to work with you can open up shadow areas, recover lost details in highlights, and make fine adjustments to colors.
There are so many RAW file formats in the marketplace that it's becoming a major problem. Here are just some of the RAW filename extensions that indicate different and incompatible formats.
. Nikon-NEF
. Olympus-ORF
. Fuji-RAF
. Sony-SRF
. Canon-CR2
. Pentax-PEF
. Generic-DNG
  • DNG (Digital Negative). Camera companies have introduced many different, and frequently changing, raw file formats. For example, one source states that there are over 140 RAW formats with more coming—some of them specific to a single camera model. On top of this, manufacturers are often pointlessly secretive about their specifications so there are almost always RAW files your software can't read—at least until someone reverse engineers the formats so they can support them. This lag time and inconvenience can be laid at the doorstep of the camera companies. These proprietary RAW files are at risk over time since companies come and go and interest waxes and wanes. One solution to this growing problem is a new Adobe format called the Digital Negative (.DNG). This publicly defined and openly shared format for RAW files is an attempt to ensure that you will be able to access your image files in the future. If your camera doesn't capture RAW images in this format, you can convert them to DNG using a program such as Photoshop or Lightroom. When you do so, you can even choose to store the original RAW image inside its DNG file so you can extract it at some future date should you need it. The DNG format is supported by Photoshop and other Adobe products, some other software companies, and a number of camera companies. As with all things in computing, only time will tell if the format becomes widely accepted or gradually fades away.
STORAGE CAPACITY
The number of new images you can store at the current settings is usually displayed on the camera's monitor or control panel.
  • TIFF (tagged image file format) is a format that's often used to exchange files between applications and computer platforms. It's supported by virtually all paint, image-editing, and page-layout applications. TIFF files tend to be larger than both JPEG and RAW images and can be saved using either 8 bits or 16 bits per color.

File Compression

Image files are huge compared to many other types of computer files. For example, files captured by a 12 Megapixel camera can range up to 18 Megabytes. As resolutions continue to increase, so will file sizes. To make image files smaller and more manageable, digital cameras use a process called compression. During compression, data that is duplicated or that has little value is eliminated or saved in a shorter form, to reduce a file's size. For example, if large areas of the sky are the same shade of blue, only the value for one pixel needs to be saved along with the locations of the other pixels with the same color. When the image is then opened and displayed by any application, the compression process is reversed more or less depending on which form of compression was used— lossless or lossy.
  • Lossless compression compresses an image so when it is uncompressed, as it is when you open it, its image quality matches the original source nothing is lost. Although lossless compression sounds ideal, it doesn't provide much compression so files remain quite large. For this reason, lossless compression is only used by the highest quality image formats—namely TIFF and RAW.
  • Lossy compression (rhymes with "bossy") can dramatically reduce file sizes. However, this process degrades images to some degree and the more they're compressed, the more degraded they become. In many situations, such as posting images on the Web or making small to medium sized prints, the image degradation isn't obvious. However, if you enlarge an image enough, it will show. The most common lossy file format is JPEG and many cameras let you specify how much they are compressed. For example, many cameras let you choose Fine (1:4), Normal (1:8), and Basic (1:16) compression. This is a useful feature because there is a trade-off between compression and image quality. Less compression gives you better images so you can make larger prints, but you can't store as many images.

Color Depth

When you view a natural scene you are able to distinguish millions of colors. A digital image can approximate this color realism, but how well it does so depends on your camera and the settings you choose. The number of colors in an image is referred to its color depth and is determined by the number of bits used to store each of a pixel's three colors—red, green, and blue. JPEG images use 8 bits per color. To calculate how many different colors can be captured or displayed, you raise the number 2 to the power of the number of bits used to store them. For example:
  • For each color 8-bits captures 256 levels of brightness because 28 = 256.
  • For all three colors combined there are 24 bits (8 per color times 3), and the total number of colors is over 16 million (224 = 16,777,216).
RAW images have greater color depth and that gives you smoother gradations of tones and more colors to work with as you make adjustments. How many more is astronomical. RAW images are initially captured by the sensor in an analog form and an analog to digital converter converts them to 10, 12 or 14 bits per color which is increased to 16 bits per color for RAW images and reduced to 8 bits for JPEG files.
  • For each color 16-bits captures 65,536 levels of a brightness (216 = 65,536).
  • For all three colors there are 48 bits (16 per color times 3), and the total number of colors is over 281 trillion (248 = 281,474,976,710,656).
When discussing color depth, photographers refer just to the bits per color or the total number of bits, and both forms of reference mean the same thing. For example, if you say "8 bit images" or "24 bit images", people will know you are talking about JPEGs and not RAW images.
 
These extra colors are not actually used by display screens, printers, or most other devices, but are there to give really fine gradations when editing and adjusting the images into their final form.
 
Name


JPEG

RAW
Bits
percolor


8

16
Total bits


24

48
Formula of colors

224

248
Number of colors


16,777,216

281,474,976,710,656

Choosing a Format

When choosing between JPEG and RAW formats, here are some things to consider about each format. Because you can't easily add pixels and retain image quality, or remove the effects of compression after the fact, it's usually best to use the largest available JPEG size and the least compression available. If you have to reduce either, you can do so later using a photo-editing program. If you shoot the image at a lower quality setting, you can never really improve it much or get a large, sharp print if you want one. The only problem with this approach is that higher quality images have larger file sizes.

RAW images are always captured at the largest file size, and any compression used is lossless. Images in this format used to require an extra processing step but since the latest programs such as Aperture and Lightroom were designed from the ground up after RAW formats were introduced they handle them as easily as they handle JPEGs.

There are a number of advantages to using the RAW format:
  • RAW lets you decide on most camera settings after you've taken the picture, not before. For example, when you shoot a JPEG image under fluorescent lights, the camera adjusts the image to remove the yellow-green tint. Any changes you make later are on top of this initial change. If you shoot the image in RAW format, the camera just captures the images as is and you decide what white balance setting to use later. You can even create different versions of an image, each with its own white balance.
  • RAW images can be processed again at a later date when new and improved applications become available. Your original image isn't permanently altered by today's generation of photo-editing applications even if they don't support non-destructive editing.
  • You can generate alternate versions of the same RAW image. For example, many photographers will adjust highlight and shadow areas and save these versions separately. Using a photo-editing program, they then combine the two images as layers and by selectively erasing parts of the top image layer let areas of the lower image layer show through so all areas have a perfect exposure.
Admittedly, there are drawbacks to using RAW images.
  • RAW files are quite large. If you use this format a great deal you will need more storage space in the camera, and computer processing times may be slightly longer.
  • When shooting images, you may have to wait longer between shots because the buffer gets filled more quickly and the camera is tied up longer processing the last image you took, and moving it from the buffer to the memory card.
  • Since RAW images aren't processed in the camera, you have to process them on the computer and export them in a usable format when you want to e-mail them, post them on a Web site, print them, or import them into another program to create a slide show or publication. When you are done shooting for the day, there is still work to do.
  • Since each camera company has defined its own proprietary RAW format, many operating systems and even photo-editing programs are unable to recognize some or all of these files. For this reason camera manufacturers always supply a program to process RAW images along with their cameras.
 
RAW images used to be hard to work with because they required some extra processing steps. The latest photo-editing programs such as Aperture and Lightroom make them as easy to work with as any other format.


Home  |  Shortcourses™ Bookstore  |  Curtin's Guide to Digital Cameras and Other Photographic Equipment  |  Using Your Digital Camera  |  Displaying & Sharing Your Digital Photos  |  Digital Photography Workflow  |  Image Sensors, Pixels and Image Sizes   |  Digital Desktop Lighting   |  
Hot Topics/ About Us


Site designed by Steve Webster and created by i-Bizware solutions, freelance web development, Anil Dada Warbhe, Website development iBizware Solutions, India.iBizware Solutions, India.