I've found that when you load a RAW image into an editing program such as Lightroom/Aperture, the image is usually worse than if you just took the image as JPEG. Now I understand that the camera does some magic during the JPEG conversion. But I'm trying to understand what that "magic" is.

If I'm looking to implement that "magic" myself on the desktop, what kind of settings should I be trying? I find that the RAW files have more extreme contrast. The dark areas for example are way darker than JPEG. Why is this? And what is the best way to fix this?

  • 1
    \$\begingroup\$ If you are using a Nikon camera, check whether Active D-Lighting is on (and turn it off when shooting RAW). This setting will affect the previews the camera generates, but not the RAW file itself. The result will be a mismatch between the camera's preview and the desktop RAW converter's result (which will look darker, especially in the shadows). (To achieve what ADL does when shooting RAW, underexpose, then brighten up the shadows in the desktop RAW converter.) \$\endgroup\$
    – Szabolcs
    Commented Jul 29, 2013 at 21:42
  • \$\begingroup\$ I had the same issue. A couple of months ago my raw files became too dark and had way too contrast. I didn't had this issue before, so I started figuring out what change might have caused this. I know much less than previous commenters about it's theoretical side, but on a practical term, switching Active D-Lightning off solved the issue. \$\endgroup\$
    – user40788
    Commented Jun 25, 2015 at 13:20
  • \$\begingroup\$ The image from the Raw data is not "worse" it is all of the data that the camera collected without the camera doing any bad magic to it. Some people are OK with letting the camera performance bad magic on their images, I am not. I prefer to apply my own magic. \$\endgroup\$
    – Alaska Man
    Commented Feb 23, 2017 at 19:02
  • \$\begingroup\$ @AlaskaMan If the camera is in any exposure both that is dependent upon metering to adjust some or all of the exposure parameters, then when ADL is enabled the camera may select a darker exposure, so that does have an effect on the raw data collected, because less light is allowed to reach the sensor due to a shorter exposure time or narrower aperture than would otherwise be the case. \$\endgroup\$
    – Michael C
    Commented Nov 9, 2022 at 5:46

4 Answers 4


A JPEG from a camera is simply a RAW image that has had some additional processing applied.

When viewing a RAW image in an image editing program, that program has to go through exactly the same steps as the camera did.

If there is any difference in appearance, it is only due to differences in the following (in very rough order from most to least important).

  1. Contrast / Gamma correction

    Gamma correction is applied which converts from the linear values to gamma corrected values as required by digital image files. This correction is not a straight gamma correction; a contrast curve is applied to ensure that highlights and blacks curve off nicely. Some cameras store the camera's contrast setting in the RAW file and some RAW editors can use this; otherwise RAW editors will use an in-built contrast curve. This can create quite a noticeable difference between the in-camera JPEG and an equivalent RAW viewed in an image editor. The contrast curve affects not only the appearance of contrast but also, indirectly, the colour saturation. The great thing about working with a RAW file is that you have full control over the contrast curve applied in software, before lossy operations such as sharpening, noise removal or JPEG compression have to take place.

  2. White balance

    White balance correction is applied to correct for different colour temperatures of light sources while taking the picture. Some cameras store the camera's white balance setting in the RAW file and some RAW editors can use this; otherwise RAW editors will guess the correct white balance to apply. This can create quite a noticeable difference between the in-camera JPEG and an equivalent RAW viewed in an image editor. Again, this can also be viewed as a benefit of editing in RAW, in that you are free to re-set the white balance without any lossy artefacts.

  3. Sharpening and noise reduction

    An appropriate amount of sharpening and noise reduction are applied to enhance the image and try to suppress annoying noise. There are different sharpening and noise reduction algorithms, and this is a lossy procedure. If this is done in-camera, then you are stuck with whatever sharpening and noise reduction was applied by the camera. A RAW image editor can adjust these values. Differences in the sharpening and noise reduction between that the camera uses and that a RAW image editor uses could create a small difference in the appearance of an image.

  4. Colour space conversion

    Red, green and blue in the Bayer filter are not necessarily the same hue as red, green and blue in the standard sRGB colour space. The camera does colour correction to convert the colours into the desired colour space, which is usually sRGB. If you an equivalent image in a RAW image editor, it will also do colour space conversion, but it may use a different colour matrix for the conversion due to the manufacturer of the RAW editing software not having access to the same colour matrices used in the camera. If your RAW editing software is correctly configured, this step should not cause any noticeable difference in the resulting picture. Those who know what to look for (for example, Canon or Adobe's signature colour profiles, which try to enhance skin tones and blues) may be able to notice the difference especially when testing.

  5. Demosaicing

    A RAW image does not store colour values for every pixel - instead each value is either a red, green or blue value. However, you need each pixel to have all three colours - red, green and blue - for the final image. Therefore, a demosaicing algorithm has to guess the other two colour parts for each pixels, and it does this based on knowledge of surrounding pixels. There are a variety of different demosaicing algorithms with varying qualities, and it is a lossy process. If this occurs in-camera, then you are stuck with the camera's built-in algorithm. If you use a RAW image editor, it will use its own algorithm. The demosaicing algorithm used is not a huge contributor to overall image quality, but can affect its sharpness, the degree to which it shows aliasing artefacts, and whether it throws away the edges of the image.

  6. JPEG compression

    For a JPEG image produced by a camera, the resulting image data is compressed as a JPEG. This is also, obviously, a lossy procedure and can make a difference when comparing it to a RAW image viewed in an image editor, though in most cases the difference shouldn't be noticeable.

In summary, the biggest points of difference between the JPEG produced by the camera and an equivalent RAW produced in an image editor are likely to be caused by:

  • Different white balance in both
  • Different contrast curve / contrast adjustment in both
  • \$\begingroup\$ Great info, but in summary, what you are saying is the reason why I'm constantly seeing a darker image in Aperture than jpegs from my camera is because Aperture chooses to use a steeper contrast curve when converting RAW than my camera? \$\endgroup\$
    – erotsppa
    Commented Jul 30, 2013 at 16:00
  • \$\begingroup\$ That sounds like it's the case. It could also be a difference in the colour space conversion. If the white point is different then it could be colour space conversion. If the white point is the same but midtones and shadows are darker it could be the contrast curve used. \$\endgroup\$ Commented Jul 31, 2013 at 1:26
  • \$\begingroup\$ Very well said...The only "magic" is that when you shoot in jpeg, the camera itself will automatically set all the settings mentioned above. But when you shoot in raw, all these settings is left for you to do it yourself. \$\endgroup\$
    – Jez'r 570
    Commented Aug 2, 2013 at 6:56
  • \$\begingroup\$ Verey interesting explanation. Just for the record for any new user reading it. This explanation is for how the images look. But there are important diferences in the amount of information inside the file. - A raw image has more information that the monitor screen can not "see" (bit depth), so it has to be reintepreted. \$\endgroup\$
    – Rafael
    Commented Apr 9, 2015 at 16:26
  • 1
    \$\begingroup\$ Lens correction/distortion correction can also vary from one raw converter to another. Both in terms of whether it is "on" or "off' by default or the exact amount/shape/type of correction applied. \$\endgroup\$
    – Michael C
    Commented Jan 30, 2016 at 8:05

Most in-camera jpeg engines increase contrast, saturation, and add some sharpening into the mix. Depending on what camera you use to produce your RAW files and what software you open them with on your computer, sometimes those in-camera settings are also applied to the RAW file when it is displayed. Of course you are not actually viewing the RAW file on your screen; you are almost certainly viewing an 8-bit conversion of that RAW file which is similar to an 8-bit jpeg.

If you are using a Canon camera and open the .cr2 files using Digital Photo Professional (DPP) the in-camera settings selected at the time the image was shot will be applied to the preview image on your screen. Most other manufacturer's in house software does the same thing. Most third party RAW conversion software, such as Lightroom or DxO Optics, do not apply the in camera settings. Some of them will allow you to build a custom profile to apply to each image as it is imported or opened.

The first thing I would recommend regarding the dark areas of your images is to confirm that your monitor is properly calibrated. The best way is to use a calibration tool that reads a test output from your screen and uses bundled software to create a profile for your monitor. A cheaper and less accurate way is to use test patterns to visually adjust your monitor's or video card's settings. Quick Gamma is one such tool. Once you know your monitor is adjusted properly, then you can use the tone curve tool in the RAW convertor of your choice to bring up the shadows.


There's no "magic" it's just that different raw processors have different default behaviors (and different algorithms, etc.).

You can see there's no magic using the camera manufacturer's own raw processor (for example, if your camera is a Canon use DPP) - this should give you exactly the same image has the in-camera processor.

I don't know about Aperture but Lightroom can duplicate the in-camera processing, just scroll down to the "Camera Calibration" section and change the "Profile" from "Adobe Standard" to "Camera Standard" (if you use the camera's "Standard" picture style, otherwise choose the setting that matches the picture style you use in-camera).

  • 1
    \$\begingroup\$ Be aware that at least with Canon, the demosaicing algorithms are proprietary, and any "presets" written to simulate Canon's own conversion algorithms by third party products such as Lightroom are at best reverse-engineered guesses. They may get close, but they won't be exactly the same. \$\endgroup\$
    – Michael C
    Commented Jul 29, 2013 at 22:19
  • \$\begingroup\$ Yeah I think this is it. If your camera can produce a pleasing image, it's doing it based on the RAW data, there's no other way it can be done. So, it is possible to get the image the way you want it, but your RAW processor isn't doing that - you have to find the right settings. The only time I've experienced this is when I took some really bad shots though - the JPG looked ok, but the RAW file was super-noisy. That was my mistake - shooting at F/22 and 'high ISO' on a dark day. \$\endgroup\$
    – Jasmine
    Commented Jul 29, 2013 at 22:31
  • \$\begingroup\$ @MichaelClark: I think you've got that wrong...last I knew, Canon offered an SDK that contained their exact demosaicing algorithms and picture styles. The problem is that Adobe simply refuses to use or reference Canon's SDK (I suspect because of some inane ruling by their legal department, not for any other "real" reason...) \$\endgroup\$
    – jrista
    Commented Jul 30, 2013 at 3:53
  • \$\begingroup\$ If they have it has been fairly recently. The RAW data is still encrypted in .cr2 files. The SDK has always allowed developers to write code that interfaces with the camera's OS and allows transport of .cr2 files, but AFAIK in the past has never contained the demosaicing algorithms for .cr2 files. \$\endgroup\$
    – Michael C
    Commented Jul 30, 2013 at 4:58
  • \$\begingroup\$ There have been other parties who have cracked the encryption scheme used in .cr2 files but they were not authorized by Canon to do so, and software companies like Adobe And DxO Labs are still reverse engineering their own algorithms. Several years ago Nikon released their demosaicing algorithms to DxO for use in testing Nikon sensors. \$\endgroup\$
    – Michael C
    Commented Jul 30, 2013 at 5:02

A raw file has colors in it that are almost universally outside the small sRGB color space. JPGs are by default sRGB. Raw files look flat because the display is only projecting colors inside the sRGB color space, which have not been converted and containing reassigned colors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.