Often I heard photographers say that RAW is used for editing photos. I have used Adobe Photoshop Lightroom before and I don't see how capturing RAW helps.

Can anyone explain how capturing RAW helps with editing and the technical detail behind?

Is it advised to use RAW+JPEG or just the RAW considering from post processing perspective?

UPDATE: Rather than pros and cons of using RAW or examples, I need information about what aspects / data collected in RAW file helps with the editing.

While Good examples of RAW's advantages over JPEG? answers this partially (it explains the way a RAW image can be edited as compared to JPEG with example photographs), the underlying principle behind using RAW for editing is not added.


Raw files contain much more information, stored in much finer increments, than 8-bit JPEGs do. Not only are raw files 12-bit or 14-bit, but they are the actual luminance values collected by the imaging sensor.

From this answer to Filter for RGB separation and its effect on the image:




The idea that you can view raw image files in any way "without applying any editing" is a myth.

Anytime you open a raw image file using an application to view it as an image on a monitor, there are development settings applied to the raw data. If you don't specify particular development settings, LR will use it own default settings. There's no such thing as a "straight out of camera" raw file that looks anything like we would expect it to look.

Here is what a demosaiced raw file (of a properly exposed scene) with the linear values recorded by the sensor uncorrected and converted to a jpeg looks like:

enter image description here

Here's the thumbnail preview image generated by the camera's raw conversion algorithm embedded in the same raw file:

enter image description here






Once we have used the raw data to create one possible interpretation of that data and save it as an 8-bit JPEG, most of the information in the original raw file is not preserved in the JPEG. Only the information needed to produce our single interpretation of the raw data is preserved in the JPEG! If all we have is a JPEG, there's absolutely no way to recover all of the other information that was contained in the raw file. Almost all of the decisions we (or our camera's automatic routines) used to process the wealth of information contained in the raw data are "baked in" and are irreversible.




As the saying goes, "The proof of the pudding is in the taste."

Below are some examples of images shot under difficult conditions that benefited from the increased flexibility that raw processing allows.


Theatrical/concert photography is one of the most challenging kind there is, both in terms of pushing the equipment you use to the absolute edge of their capabilities and in terms of requiring every bit of skill and experience you might have as the photographer.

Photography is the art of capturing light. Most concerts don't offer much light to capture and what light there is to capture is changing rapidly and the subjects are usually very animated. So the traditional solution to not much light (longer shutter speed using a tripod to hold the camera still) doesn't work because nobody on stage stands still for 10-15 seconds while you take a picture. The traditional solution to capturing motion (faster shutter speeds) doesn't usually work because there isn't enough light to capture a good image on a small sensor with a narrow aperture. In the end you have to balance the two as best you can AND use gear that allows you to capture as much of the scarce light that is present in the scene in as fast a time as possible. That means fast lenses (wide apertures), larger sensors, and cameras that are highly responsive (fast handling).

Due to the nature of the less-than-full-spectrum lighting used at many concerts, post processing is a necessary step to get optimal results. Although you can use custom white balance an/or white balance correction in-camera, the range of adjustment they give you in-camera is very often not enough to fully compensate for the deficiencies in the lighting.

Straight-out-of-camera JPEG under difficult LED stage lighting that is now quite common in small bars and nightclubs:

enter image description here

Color correction using the "eyedropper" color picker tool applied to the jpeg:

enter image description here

Color correction using the "eyedropper" color picker tool (on the same spot in the scene as above with the JPEG), as well as simple contrast, highlight, shadow, and saturation slider adjustments, applied to the raw image data:

enter image description here

Post processing raw files with many applications will give you more room to adjust the white balance and also give you the power of an HSL (Hue-Saturation-Luminance) tool that lets you adjust each of about eight different color bands independently of the others. Please note that White Balance encompasses more than just Color Temperature. Color temperature is but a single axis in the two dimensional color wheel. (Brightness/saturation of any particular hue is yet a third dimension). White balance includes adjustments along the Green ←→ Magenta axis as well as color temperature adjustments along the Blue ←→ Amber axis.

The accepted answer to How to cancel purple stage lighting on subjects? covers white balance for photographing stage acts in smaller clubs that almost exclusively use LED lighting these days. This answer to Blown out blue/red light making photos look out of focus specifically talks about how to deal with LED lighting when only the blue and red lights are up and the green lights are dark.

Image with standard 'Auto white balance' and other in-camera settings applied:

enter image description here

The same image with significant WB correction, contrast, and HSL adjustments:

enter image description here
Canon EOS 5D Mark III + EF 50mm f/1.4

Sports under dim, flickering lighting

In-camera produced JPEG:
enter image description here

Edited JPEG using the above JPEG as the source:

enter image description here

Edited CR2 file of the same image:

enter image description here

For more about how this image was produced, including raw processing steps applied to the data from the raw file, please see: Lots of noise in my hockey pictures. What am I doing wrong?

High Contrast Scenes

RAW file with Canon's "neutral" in-camera processing applied using Canon's Digital Photo Professional (ver. 3). This is pretty much identical to what an out of camera JPEG would have looked like:

enter image description here

The same .CR2 file after extensive processing and tone mapping using the raw image data:

enter image description here

For more about how this image was produced, please see this answer to: How to make camera LCD show true RAW data in JPG preview and histogram?

Low CRI Lighting

Some forms of lighting are designed with energy efficiency as the primary consideration. They have poor CRI (Color Rendering Index) performance. This means that, unlike most natural light sources, they don't produce a broad spectrum of visible wavelengths, but only emit a narrow spectrum of wavelengths of light.

Three versions of the same image. The one on the left is an unedited conversion of the raw image opened using default settings. The one in the middle is a color corrected conversion made using the raw image data. The one on the right is an attempt at color correcting a JPEG version of the image on the left.

enter image description here

For more about how this image was produced, please see: Why can software correct white balance more accurately for RAW files than it can with JPEGs?

One thing that all of these examples have in common is that someone had to apply their expertise to process the raw image data to produce a better image than what the camera's automatic processing routines, the photographer's manual settings done in camera, or the default interpretation of the raw image data by a raw convertor such as Lightroom, could produce. It doesn't happen automatically when a raw image file is first opened in LR very often.

From the comments:

... raw files are 16 bit formats, just as dng's and tiffs are. They may contain 12 or 14 bits of information depending on the ADC process used; but that is only true when the sensor is generating 12 or 14 bits of data. At high ISOs the sensor may be generating less than 8 bits of data, in which case the file format is irrelevant because even the 8 bit jpeg format has enough accuracy/capacity to record it. But what is not irrelevant is the lossy processing the camera will apply to jpegs regardless of how much data was originally available.

"... but that is only true when the sensor is generating 12 or 14 bits of data." At the most fundamental level (each sensel), sensors do not generate bits of anything. They generate analog voltages. There can be a very large number of potential voltages generated between "0" and full well capacity.²

Even high ISO files can use the full range of 16,384 discrete values between 0-16,383 to numerically assign luminance values to the analog signal when it is converted to a 14-bit digital file. The highlights, represented by any voltage over the "gate voltage" are still "16,383". Due to the analog amplification applied, it takes much less than full well capacity to produce enough analog energy to "peg the meter" and everything past that is, of course, clipped. But all of those voltages above the threshold are assigned the same value (16,383). None of the other 16,383 values between 0-16,382 are wasted on those clipped values. Just because there may be 8 Ev or less of DR in the information between darkest (lowest voltage) and brightest (highest voltage) after an analog amplification of 64X (six stops, or ISO 6400 for a sensor with a base sensitivity of ISO 100) does not mean that only 256 discrete values are used to numerically represent that information. All 16,383 discrete values are still available when encoding those analog voltages to 14-bit numbers.

"... in which case the file format is irrelevant because even the 8 bit jpeg format has enough accuracy/capacity to record it."

This understanding also fails to grasp that raw values are linear monochrome luminance values. If you stretch only 8-bits (256 discrete values) of linear raw luminance information when applying light curves to approximate the logarithmic (with "shoulders" at the extremes) response of human vision, you'll get far rougher transitions from dark to light than an 8-bit jpeg, which is typically produced by converting to 8-bit and then compressing only after demosaicing and gamma curves have been applied to 12-bit or 14-bit numbers, will demonstrate.

It doesn't matter how many digits it's written with, nor how much amplification is applied to get there. If the sensor is only generating 8ev/bits you cannot increase the accuracy beyond that.

Again, there is not a necessary direct relationship between "1 Ev" and "1-bit" any more than there is a direct relationship between "one stop" and "one zone" in Adams' zone system. That was the entire point of what Adams did: to squeeze more than 11 stops into the 11 zones (0-10 inclusive) for high contrast scenes and to stretch fewer than 11 stops to the full 11 zones for low contrast scenes. When we amplify analog voltages before converting them to digital, we are doing the equivalent of the latter.

One can represent more than 8 stops of DR using an 8-bit JPEG. We do it all of the time. To do it, we do have to give up smooter gradations using only the 256 discreet numbers available (0-255) to fit more dynamic range into 8-bits.

It the same thing as converting an 8bit jpeg to a 16bit file/space, or increasing the exposure in post... the numbers are different but nothing else has changed, and there is no increase in the accuracy of the original data.

No it isn't. Smooth slopes are not converted to "stairsteps" until after digitization occurs. When you amplify an analog sine wave, you do not get a "stair step" pattern, you get a sine wave with a steeper slope, but it is still a continuous slope. If we collect an image that contains a smooth range of analog voltages with at least 16,383 different evenly spaced levels between "0" and one-fourth of the sensor's full well capacity, when we amplify that analog voltage by a factor of 4X (two stops) we still have 16,383 different evenly spaced voltages that are 4X stronger than they were before. The slope between the lowest and highest levels is not sliced into discrete stairsteps until we do analog-to-digital conversion.

All values below one-quarter full well capacity (FWC) can be smoothly digitized to all 16,384 values of a 14-bit file when the analog signal is amplified by two stops (4X) the native sensitivity of the sensor. All values over 0.25 FWC will be clipped at "16,383". Values beneath 0.25 FWC can be smoothly distributed along the entire 16,384 values possible using 14 bits.

"At the most fundamental level (each sensel), sensors do not generate bits of anything. They generate analog voltages." And that's the point... high ISO's are used to compensate for collecting lower levels of light and generating lower voltages. And when that is done there is less difference between the min and max voltages generated by the sensor... I.e. less accuracy/information.

There's certainly less difference in total brightness range recorded at higher analog amplifications, which means finer gradations for each value between "0" and "16,383". Only digital amplification of already digitized information will skip some of the values between "0" and "16,383". For example, if you raise a raw image 2 Ev digitally, you're multiplying all of the values by "4X" and the resulting values used will be 0, 4, 8, 12, 16, etc. while values not used will be 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, etc. The analog information prior to ADC does not suffer from this limitation. Within the range of voltages that are not over the system limit, smaller differences in the pre-amplified voltage can be assigned to each of the 16,383 "steps" of the digitized values. All values between "0" and "16,383" are still possible even after the analog signal has been amplified 4X base ISO. It's just that anything over one-fourth of full well capacity before amplification will then be over the maximum voltage threshold and equally clipped.

The biggest problem with doing this is that all "shot noise" (Poisson distribution) and the mostly thermally related "read noise" in the analog voltages read off the sensor are amplified as well, so when we start processing it digitally, we tend to raise the noise floor by cutting off everything below a higher value as "black." (We cut off a good bit, even at base ISO, but we tend to cut off more as the analog amplification is raised.) But that does not mean we have to. The information is still there in the digitized numbers of our 14-bit file.

It is irrelevant what number is used to describe a value... and all values are relative. I.e. I can use a ruler with 1/32 increments or 1/4 increments, but if what I am measuring is 1/1 it makes no difference.

And there is a direct relationship between 1 bit and 1 EV... the digitized value must be 2x the previous in order for it to represent/record a 1stop/EV difference.

There is no direct relationship between bits and Ev until you have digitized things into bits!

The increments on your ruler do not create discrete steps until digitization! You can measure any number of objects that are any (theoretically infinite) number of lengths between 1/2 inch and 17/32 inch. The objects will all fall between the two marks on your ruler and be recorded (digitized) with the same number. If you magnify the objects by 4X before you measure them, the lengths of the objects between 1/2" and 17/32" when magnified by 4X will range from 2" to 2 1/8" (2 4/32"). A step of 1/32" after magnification (analog amplification) allows for four discrete recorded values between 2" and 2 1/8" instead of one.

There will now be four discrete values of the magnified object between 2" and 2 1/8" using increments of 1/32" where before there was only one discrete value between 1/2" and 7/32".

² The Canon EOS 1D X Mark II, for instance, has a full well capacity of 103,999 e-. Since each increase of one electron registered by the sensor would give a corresponding increase in voltage, that means such a sensor has the potential for 103,999 different voltage levels for each sensel at base ISO. This is more than 6X the 16,384 discrete values possible with a 14-bit digital numeric value. So only at an amplification of more than 6.34X would it not be potentially possible to have an amplified voltage for every discrete value between 0-16,383 when the analog voltages are digitized. That's 2.67 stops, or ISO 640 for a sensor with base ISO 100. 103,999 potential different voltage levels is 406 times the number of discrete values possible with an 8-bit digital numerical value. A factor of 406X is 8.67 stops (2^8.6666=406). That equates to ISO 40,960 before a difference of one electron is theoretically equal to a single discrete step with an 8-bit digitized numerical value!

  • Such an in depth answer. This answers what I really needed to know about RAW files and a bit more about conversion in screens. Can't upvote because of the rep. I will get back to the question once I have upvote privilege. – obligated to keep his content Feb 15 '19 at 6:22
  • @StevenKersting Even high ISO files use the range of 0-16,383 to numerically assign luminance values to a 14-bit file. The fully saturated highlights are still "16,383". Due to analog amplification, it takes much less than full well capacity to produce enough analog energy to "peg the meter" and everything past that is clipped. Just because there may be 8 Ev or less of DR in the information between darkest and brightest does not mean that only the range between 0-255 is used to numerically represent that information. – Michael C Feb 15 '19 at 18:04
  • Not to mention that your overly simplistic comment completely ignores the fact that raw files are a singular linear monochrome luminance value per sensel, not trichromatic RGB values per pixel following demosaicing that have usually been adjusted using gamma curves. – Michael C Feb 15 '19 at 18:06
  • "... but that is only true when the sensor is generating 12 or 14 bits of data." At the most fundamental level (each sensel), sensors do not generate bits of anything. They generate analog voltages. – Michael C Feb 15 '19 at 18:14

Your camera sensor measures light on 12 or 14-bit which means 4000 or 16000 different levels. In 8-bit you only have 256 different levels. So when you store the image as JPEG (8-bit/channel) you have discarded some information. Of course, some of it would not make much difference and some of it would be mostly noise. But in practice:

  • Editing a JPEG image quickly leads to color loss (banding, etc...)(*)
  • Having the raw data lets you try several algorithms and settings to pick out the final 8 bits that will go in the JPEG you share... The JPEG from the camera is just one possible outcome among thousands.

Personally, I usually keep the camera set to RAW+JPEG.

  • Very often the RAW is just there to cover my rear (wrong color temperature setting...) and for plenty of things the JPEG from the camera is good enough (especially if you can set the camera JPEG parameters).
  • Sometimes the lighting conditions make it difficult for the camera and I can do a better job than the camera (night photography, for instance)(but I remain modest, the Canon engineers know their job better than I do).
  • Sometimes a picture is worth spending time on it and I take the RAW file to try to make the most out of it.

(*) Each time you perform some global adjustment (color balance, brightness, contrast...) you map a range of input values to a range of ouptut values that has the same span. With JPEG, you map 256 values to another set of 256 values. There is an additional constraint, the biggest of two input values should have the biggest output value (if you use Curves this means that the curve should be increasing left to right...). Now, assume that you want to increase the brightness a bit: level 128 becomes level 132. To do that you squish values 128-255 into 132-255 (so somewhere four input values get mapped to the same output). At the other end of the range, values 0-127 are mapped into 0-131. But you don't get 132 different values... you still have 128 different values and 4 values are not used. So you have lost 4 levels, 2% of the range. And this was a fairly small correction, done only once. Of course, this also applies to raw data but when you convert all this to 8-bit data for display this isn't visible.

  • I am familiar with the RGB and CMYK where each layer is represented by 8 bits. What additional information does the 12 or 14 bit RAW contain? – obligated to keep his content Feb 15 '19 at 3:04
  • I assumed JPEG compression makes use of DCT and run length encoding to produce images with less space and does not store the RGB values directly. – obligated to keep his content Feb 15 '19 at 3:18
  • The raw contains data from the Bayer mosaic, not really pixels at this point. Whatever the compression method the idea of JPG is to store image encoded as a 8-bit RGB. Best site for RawTherapee is here. – xenoid Feb 15 '19 at 7:14
  • @nightgaunt raw image data contains a single luminance value for each sensel (a/k/a photosite, pixel well, etc.) on the sensor. That's it - one number that describes how much light energy hit that one sensel during the exposure. That information must then be demosaiced to produce color information which results in three 8-bit numbers per pixel: one for R, one for G, and one for B. – Michael C Feb 15 '19 at 18:13

JPEG is a format using lossy compression depending on the physical and perceptive limitations of human vision. It throws away information that it considers less relevant than some fixed or variable threshold. That's fine if you just view the image. If you try to enhance it, however, because some things need correcting or bringing out, the JPEG may have already acted on the estimate that such things will stay as they are. For example, if you have something in semi-shadows that you needs to be more visible to make the photograph good, the JPEG might already have decided that since the detail is in semi-shadows, it can throw away the fine detail.

Whenever you need to correct some image because it does not serve its purpose as it is, the JPEG might already have thrown away what you need to make it serve its purpose. If there is something important that is slightly unsharp, you can sharpen it at the cost of some noise proportional to the noise of the digitization. If the JPEG compression has decided to flatten a defocused area into a single color, sharpening is no longer possible.

So basically doing JPEG compression only makes good sense when the next step is enjoyment by a human viewer and you can throw away information that the human viewer is not likely to notice. When the next step is algorithmic processing, the assumptions JPEG compression makes for throwing away information are not matching the use of the photograph.


The RAW image is the raw sensor data the sensor captures, usually 12 or 14 bits per pixel.

Based on the raw sensor data, the camera needs with an extremely limited processor and severely limited processing time to create a JPG with 8 bits per pixel and lossy compression. Lossy compression isn't good for editing, the 8 bits per pixel loses some dynamic range, and the limited processor and processing time mean only very quickly running algorithm can be used for e.g. demosaicing, denoising etc.

By choosing RAW, you are choosing better dynamic range (12 or 14 bits), a more powerful computer with less limitations on the available processing time (so better but slower algorithms can be used for e.g. demosaicing, denoising, etc.), and you can yourself control how much lossy compression you want in the JPG. The JPG should obviously be stored only after you have performed all editing you want to do with the image.

Got incorrect exposure? That is fixable. Too much noise due to high ISO setting? Run a profiled denoising algorithm on the image. You can even adjust the color curves to make 8 bits represent more dynamic range than it usually does by making the curve non-linear.

If computers improve due to Moore's law, you can in the future extract more detail out of the RAW images you captured dozens of years ago.

RAW loses no data. JPG loses lots of data. Less lost data is better. Ergo, RAW is better.


RAW has all the information your censor outputs, jpeg is the file your camera has made taking all the information from the censor and using its standard algorithms to render a jpeg, dumping all the data it doesnt use for the creation of the jpeg.

Therefore jpegs lose all the shadow and highlight recover-ability.

Also RAW can take a lot of color grading without falling apart (losing tonality and/or noise)

Downsides are the about 3x size compared to jpeg and the fact that you cant share it. You have to open it with a raw editing program such as Photoshop, Lightroom, Capture 1 etc and export your jpeg with or without applying changes to the RAW.

If you are uncertain of your editing skills or not sure you will have the time to bother shoot RAW + jpeg, but i suggest you start shooting RAW and learning editing. It will help you improve as a whole and also make your photos better and more professional.

Hope I helped. John.
