Home Gallery Articles About Me Contact Resources

RAW vs. JPEG

Introduction:
All digital cameras are able to shoot and capture images in the jpeg format. This is probably the most common and understood format available. Every device understands jpeg, can display or print it, be it a pc or Mac. Everyone is comfortable with jpegs and how they behave.

Most digital cameras these days (SLRs anyway) can capture images in the RAW file format. A lot of people shoot jpeg and then wonder if they should be using RAW instead to get "better" images. Well, "better" often depends on the situation and the choice behind using one or the other.
 
RAW:
  • A RAW file is not an actual image file. It is the complete set of date from the image sensor without any adjustments applied to it.
  • RAW files differ between manufacturers and can only be opened in special software.
  • They are also lossless in terms of quality as opposed to jpeg.
  • RAW files must be converted to a usable image format before they can be displayed or edited.
  • RAW contains 12 bits per channel.
  • RAW is read only, as changes are saved in sidecar XMP files.
  • Fairly large file size.
  • High dynamic range image capable of displaying more shadow and highlight detail.
JPEG:
  • JPEG is a compressed image that results from a set of adjustments being applied to RAW data in the camera.
  • Useable by any image program available.
  • JPEG is a lossy format.
  • JPEGs can be displayed by any device and printed by any device.
  • Contain 8 bits of data per channel.
  • Read and write capable, meaning that you can overwrite your original image with an edited one.
  • Fairly small file size.
  • Lower dynamic range than a RAW file, typically suffering from  highlight detail loss.
Which to use:
Well lets begin with file size. RAW files are huge. The Nikon 10mp D200 produces 16mb uncompressed RAW files vs. 4 to 7mb jpeg files. So if you are limited in space, you might be better off using jpeg rather than RAW. If you wish to display your images right away, such as a slideshow, you should consider jpeg or RAW + jpeg which is available on the higher end DSLRs. If you are not constrained by file size, RAW would be a good way to go.

If you are not going to edit your images then RAW is a waste of time. Stick with jpeg. If however you do significant amounts of editing, consider shooting RAW.
 
Using jpeg:
If you shoot jpeg, then the camera is essentially your darkroom. The settings that you select in camera such as white balance, sharpening, color space, file size, and quality will be applied to the data as it comes of the sensor and the resulting file will be stored as a jpeg. The onboard computer will set contrast, color curve, saturation and white balance all before saving. The compression occurs as a final step. Some color and resolution is lost due to the compression algorithm.

To achieve this compression, the image is divided into 8x8 or 16x16 pixel blocks. The algorithm then decides what data can be discarded based on perceivable difference between the pixels in each block. Once each block is analyzed and certain data discarded, the image is then put back together and saved. The discarded data is lost forever and there exists no way to recover it.
 
Using RAW:
If you shoot RAW, your computer becomes your darkroom. What has more processing power? Computer or Camera? The answer is obvious. Shooting in RAW will give you much more control over your workflow and how your images look at the end of editing. White balance can be ignored in camera since this is applied during post processing. However, it is good practice to adjust your white balance even when shooting RAW so that when you switch to jpeg for whatever reason it will be a habit and you won't run into problems.

RAW gives you the ability to fix some of your errors that occurred during exposure such as an incorrect white balance setting or an underexposed image. Since all of the sensor data is stored, you can set the white balance to anything you wish. It is also possible to recover more highlights using RAW over jpeg, be aware however that overexposed images are the same in both. Once a pixel is overexposed, you're out of luck.
 
Editing jpeg:
Editing jpeg images is fairly straightforward. Just open in your favorite editing program and off you go. Be warned that large shifts in color and other heavy editing will often result in banding and other errors due to lack of available information (this is what was discarded during the jpeg compression in the camera). Also be aware than unless you save your image in a format other than jpeg, you will be compressing and discarding data yet again and your image will suffer. This is apparent from the example below.
 
Original jpeg original jpeg crop
This is the original jpeg file, just sized down and saved as a jpeg. This image is 88.5 kb. This is a crop from the center of the original jpeg file with no changes made also saved as a jpeg.
 
saved again jpge saved again jpeg crop
This is the save jpeg, just opened and saved again as a jpeg. Again a crop of the left image. Now you can clearly see the artifacts caused by editing and saving again as a jpeg.
 
If you are going to be editing jpeg files, always remember to save them in a lossless file format such as a PSD or TIFF. This ensures that you can go back and edit your image countless times without risking quality.
 
Editing RAW:
Images shot in the RAW format are not editing in camera. Hence all you have to worry about is composition, sharpness, and exposure. Everything else can be changed in your RAW converter.

Editing RAW is not as easy as jpeg. You first have to have a program capable of opening your particular RAW format. For example, the Nikon RAW format is designated by ".NEF" after the filename. You cannot open this file in just any program. Most cameras capable of capturing images in the RAW format will come with some sort of free software that will enable you to open your RAW images. Be warned however that this software is usually underpowered and not very easy to use. If you are serious about editing your images be prepared spend some money on a RAW capable program such as Photoshop. This applies to jpeg as well, but it that case you can get away with a program that does not support RAW.

When you initially open a file in your RAW converter (Photoshop, Lightroom, Raw Shooter, etc.) you will be presented with a number of options that can be applied to the image. Notice that the RAW image looks fairly bland and is not very sharp. A lot of people complain that their RAW files look poor when compared to a jpeg of the same scene. This is due to the fact that no color enhancements, contrast adjustments, white balance or sharpening have yet been applied to the image. That is the reason why the RAW image looks "weak", all these adjustments have yet to be applied.

In your RAW converter adjust all the options and sliders until the image is to your liking. Sharpening should be done as the very last thing before you save your file. Manipulating a sharpened image can lead to problems. For example, when using the Photoshop Camera Raw converter, I adjust all the settings until I like what I see and then I open it in Photoshop. I make the necessary edits, cloning, dodging, etc, sharpen the image and finally convert the image to my output color space and save in whatever format is desired. Always make sure you save a copy of your image in a lossless format so you can have something to come back to if you need to make some more changes. If extensive changes are needed, simply come back to the original RAW file and give it another shot.
 
Pros and Cons:
Here is a summary list of pros and cons of each format.

 

Format Pros Cons
RAW High dynamic range Special software required
  Lossless format Huge file size
  Set white balance later Buffer fills fast during continuous shooting
  Ignore in-camera settings Less files on a memory card
  Highlight recovery  
  Better editing in software  
  Digital negative  
     
Jpeg Smaller file size Risk of artifacts
  Fast turnaround time File compression
  Less processing to worry about Lack of white balance adjustability
  No special software needed Editing capability not as extensive
  Universal format Noise reduction done in camera
  More room in buffer during burst shots  

 

Final thoughts:
At the end of the day, what format you use is up to you. Generally if I do lots of continuous bursts, huge quantities of images, or HDR blending, then I stick with jpeg. If I want the most out of my images then I shoot RAW. File size considerations don't really come into play anymore given the availability of  hard drive storage solutions ranging from cheap 250gb disks to multi terabyte towers.

Whatever format you choose, always remember to keep your originals backed up at least twice and at different locations. If you use RAW, it might be a good idea to convert the RAW file into a non-proprietary format such as a Tiff, PSD, or DNG for future compatibility and store both.

I hope this article has cleared up some of the issues surrounding the RAW image format. If you haven't yet played with it, I would suggest you at least try it. If it does not appeal to you, then you can always keep using jpeg. However, RAW might open windows that up to now have remained closed.

Cheers.

About Me Articles Black And White Castles Contact Me D200 Fireworks Gallery Gear Guarantee HDR Home Hyperdrive Space Macro Markins M10 Q-Ball MTB Nature Night Nikon D200 Nikon 12-24mm Nikon 10.5mm fisheye Nikon 18-200mm Nikon SB-600 Panorama Perspective Printing Print Purchase Purchase Digital Resources Reviews Sigma EM-140DG Tamron 180mm Macro
Tamron 90mm Macro Viewing Waterfalls Wildlife

CopyrightŠ Petr Vodnak. All Rights Reserved