DIVERSES → Fotografie (Artikelb)

Fotografie: ? RAW or JPEG ?

Copyright by Michael Bockhorst 11 01 10 - 16:35
How to take and store photos? What are the specific advantages of RAW and JPEG? This article provides a comparison and some hints when you might profit from RAW, JPEG or using both.


The RAW format stores all the data which were read out from the sensor by the camera electronics. RAW might contain compressed or uncompressed data. If it is compressed, typically a loss less compression is used. We all know it from ZIP archives. Our text documents are compressed but after decompression there are no missing letters or words.

The JPEG format stores a data set which is calculated from the raw date read out by the camera from the sensor. JPEG renders colors with 8 bit per pixel (red, green, blue) - modern digital SLR cameras have 14 bit data recording per channel, this is a first step of data reduction. JPEG reduces further data by an algorithm to remove detail according to our perception capabilties. It's similar to the MP3 audio files where non-hearable detail is omitted. The JPEG algorithms allow to set the level of datareduction - you all know it from your camera or your photo editing software. You can set the quality level. The GIMP, the only bitmap editing software I use on a regular basis, allows to set the quality level and show the updated resulting image and the file size. Use a 800px wide Image on your favourite image software at 100 % magnification and play around with different quality settings - a good experiment to learn about data reduction and visual perception!

File Sizes - Some Dry Gymnastics

JPEG reduces data so JPEG files tend to be substantially smaller compared to RAW data files. But let as compare both formats on a mid-range digital SLR camera with 10 Megapixel resolution and 14 bit resolution per pixel because I use the Canon EOS 40D.

RAW means 10 Million Pixels x 14 bit per Pixel resulting in a maximum file size of roughly 17 Megabytes per shot. The typical file size is around 12 Megabytes for detailed subjects due to lossless compression.

JPEG images of highest quality with very detailed subjects might have sizes of 10 to 12 Megabytes. But many scenes - blue sky above a white snowy landscape - have large areas of nearly the same color. Here the pixel related data is omitted by the JPEG algorithm. This results in files of a few Megabytes at 100 % quality where the details, e.g. a lonely black tree, are clearly visible. The theoretical maximum file size is roughly 30 Megabytes: 10 Megapixel for red, 10 Megapixel for green and 10 Megapixel for blue if each pixel has a different color.

Using high ISOs leads to noise. Noise means different colors for pixels just if you take a picture of a homogenous area. This affects both, RAW and JPEG compression. But this is theory not photography ... at least.

The collection of photographs shows different quality levels and the corresponding file sizes. JPEG allows very good visual quality using only a fraction of disk space.

== FOTO Fireforest in verschiedenen Qualitaetsstufen ==

Before we dig deeper into differences between RAW and JPEG, let us compare the workflow between both types of files.

The Workflow

Each type of photography has its technical workflow. The following tables compares the steps after you have created the image in your mind:

Analog Slide
Analog Negative
Digital JPEG Digital RAW
Shutter release
Shutter release Shutter release
Shutter release
Development of Film

Data recording +
JPEG conversion +
Data storage

Data recording +
Data storage
  Exposure +
development of
the print
conversion by
View via projection View on paper

View on screen or
paper or projector

View on screen or
paper or projector
Archive slides in box
Archive negatives
Archive one file on
appropriate media
Archive two files on
appropriate media

The green steps does the camera for you. It is obvious that all processes are very similar. Except with RAW. There are several standards for RAW files ... but several standards are no standard. RAW files have to be converted by a special software to the final image in e.g. JPEG format.

Archiving your images is the most neglected (I speak about myself) point - how to organize an archive? How to take care about the consistency of Slides, Negatives, Files?

Just RAW makes things more complicated: You need to store two or more related files: The "Source File" with the RAW format and the derived JPEG file to archive the original and the standardized JPEG file.

Is there a Reason to Shoot RAW

This depends on

  • the cameras internal RAW to JPEG conversion capabilities
  • your photographic capabilities
  • your field/type of photography
  • your abillty to handle archivation
Cameras RAW2JPEG: Some cameras do a great job with the conversion, some cameras are not so brilliant. Nikon seems to have good converters, Canons DPP software delivers much better quality as the internal camera processing.

Photographic abilities: If you always gain exact exposure and color balance and have perfect lenses, use JPEG files with a high quality setting above 80 %.

Photographic field/types: Photographing memories: If you shoot for 4 x 6 inch prints (10 x 15 cm) under uncritical light conditions, 3 Megapixel JPEGs of medium quality are sufficient. If you take photographs in critical light - high or low contrast scenes, highly variing light amounts - and if you have to act really fast: RAW allows nearly lossless exposure corrections of +- 1 EV afterwards. If you perform landscape, product, portrait, architecture photography e.g. you want the highest quality: RAW helps you to correct lens aberrations - see the section below.

Archiving of your works: Archiving slides or negatives is simple because you have real objects to sort and store. Archiving files is a virtual thing, but allows the search for images by subject etc ... if you have done everything right. RAW complicates the situation because you have a RAW file (compare it to one negative) and different derived shots with different color or contrast settings (compare it to different prints of a single negative).

There exist a lot of reasons to shoot RAW depending on the circumstances. O.k., you can correct JPEG files but keep in mind, that JPEG is reduced data especially when recordet with medium or low quality settings.

The Second Great Advantage of RAW

RAW allows to change settings for export to JPEG without losing original information. The set of features depends on the software you use. As Canon user I have and use only DPP (Digital Photo Professional). It allows to change different settings for the conversion including cropping and severals sets of color/contrast settings in one RAW file.

How to Keep Things Simple and Compact with RAW?

  • Method one - the simplest method: Shoot always RAW only:

    In that case you have to process the RAW files afterwards but you can do that as a batch job. It consumes time on your computer but drink a cup of tea while you computer works for you.
    If you need the photos only to print some 4 x 6 inch (10 x 15 cm) prints: If you have under-/overexposed images or strange white balance, correct it in RAW. Generate the JPEG files in moderately high resolution. Delete the RAW files and keep just the JPEGs.
    If you plan to take photos for an exhibition or large posters, you can optimize RAWs in different terms to support the photographic expression of your work - see below where RAW can help you and where not.

    Hint: Shooting RAW all the time helps you to take photos with a single configuration. There is no hassle with questions like "Shit do I have my greatest photo with VGA resolution as JPEG ...?" - A great photo with a 10 Megapixel camera as 640x480 pixel shot means: 0.25 Megapixel resolution! What an awful situation.
  • Method two - Shoot RAW plus JPEG:

    Then you have the original data and the JPEG for fast previews without special software.
    In critical situations/lighting conditions RAW helps to get the best from your photo. But if the JPEG is o.k., why bother with the RAW file

    Hint: There is always the hassle with two corresponding files from the beginning ... it's up to you.
  • Method three - Shoot RAW or JPEG according to the project:

    Set the cameras storage format after the needs for your project. For Web images 640x480 is sufficient, for work intended for posters or other high quality output use RAW.

    Hint & Warning: If you forget to choose the right file format for storing the images you might loose shots in appropriate quality - see the hint in method one.

10 years ago, where analog photography was the only way to technically good photographs, we were deliberated of such choices. There was one resolution setting, one quality setting, one storage format: the film you have choosen!

What are the advantages of RAW during postprocessing?

RAW files provide higher dynamics compared to JPEG files. This helps to adapt photos for your needs in a certain range.

  1. Exposure correction

    14bit resolution means that each camera pixel can produce roughly 16000 discrete values according to the amount of light which hits that pixel during exposure. The higher the range of measurement the higher the dynamics of the camera. Potentially.
    You loose dynamics by noise especially at high ISO values.
    You loose an additional amount of dynamics during the conversion of 10 Megapixels (3.3 Megapixels for each color) to the 10 Megapixel full color image (10 Megapixels for each color).

    In fact you have a near lossfree exposure correction potential of +/- 1 EV.
  2. White balance & color corrections

    Higher effective dynamics supports color corrections with less loss of data. See 1.
  3. Contrast correction

    RAW has a higher dynamics (see 1.) helping to change the contrast without visible losses. Contrast is very important for the impact of a photo. If you cannot manage the light, you will profit from RAW.
  4. Lenses: Chromatic aberration correction

    If a lens has chromatic aberrations the projections: The red, green and blue partial images are recorded in different sizes. This effect increases with distance from the image center and shows color fringes best visible in high contrast scenes - e.g. black tree branches against a white sky.
    Chromatic aberration correction can be done easily in a RAW converter without visible losses. Sometimes one can observe artifacts at pixel level around highly contrasty objects which are less visible as color fringes.
  5. Lenses: Fall off (at high apertures)

    Most lenses show fall off at maximum apertures. This can be corrected with good technical results. Higher dynamics of RAW files helps here again because the fall off is corrected by a "region dependend exposure correction".
    Photographically it is not always interesting to correct that type of lens aberration. Fall off helps to focuse the viewer onto the main subject in or near the center of the image.
  6. Lenses: Distortion (barrel/)

    This works with all types of image files. RAW doesn't help really. Distortion is corrected by scaling pixels by a small amount. The pixels of the original image are moved to new pixel coordinates. Pixels have to be splitted between two new pixels - it hurts (not only mentally!) the integrity of the images and leeds to loss of visual sharpness. That effect occurs with RAW and JPEG equally.


Is there a final reason to use RAW or JPEG generally? No. The decision has to be backed by the photographic needs and your preference to work with the results.

Perhaps it's a good idea to tell you about my decisions:

  • I don't want to change settings on my camera except those who are relevant for classical photography. That includes aperture, exposure time, ISO if necessary.
    All the other parameters are mostly constant: WB = Daylight, Exposure Eval Method = Spot, Winder = Single shot, AF control = Single, AF field = center
  • I don't want to miss a great photograph because the camera had a "wrong" setting.
  • I want one source file from which I derive the final photographs.
  • I want the freedom to change photographically relevant things after exposure with a minimum of losses like contrast, color balance, sometimes exposure.
  • There are situations where you need optimum quality - then you have to correct some lens flaws without to much quality loss.

My conclusion ist to shoot always RAW but I keep always in mind that RAW does never help against strong mis-exposure or other failures during exposure - you have only around 1 EV safety range!

Bottom line

I use the Canon EOS 40D with 10 Megapixel sensor which corresponds well to the optical quality of my lenses which I have chosen carefully (as balance between optical performance, transportabiliy, flexibility, cost).

Canon delivers the DPP (Digital Photo Professional) as standard software for the conversion of RAW files which is a well recognized software. It allows very efficient manipulation of single or multiple RAW files with a very clean interface. It is one of the rare situations I have seen a commercial software which really helps as a tool.

Canon systems are mentioned because I use them. I use them because I am used to use canon systems since the 1980s. All other serious cameras from other brands do the same for you if well used!