I've just started using RAW/NEF files and came across this problem with dark images. I've been reading a bit and I know that an application I open my NEFs with must do some processing to show what camera usually shows on previews. I also know DCP profile files can be used to show the photo in right colors.

As a beginner I've decided to try post processing of photos on a free program called RawTherapee 4.2.73. I'm fairly sure it's not programs fault because I've seen those kind of issues from other people on other programs. I also tried using the DCP profile file (from Adobes DNG converter) but there was barely any change.

Anyways below is an example of two very similar pictures, the left one was loaded for editing thus showing RAW data, and on the right only a preview (only as thumbnail) which is displayed correctly.

enter image description here

So what do I have to do to load NEF files correctly?


OK I'm confused now, I just took another picture and This picture is opened correctly also in RawTherapee. This is the picture (I uploaded NEF to tinypic.com but it got converted to jpg):

enter image description here

I made a picture of Histograms for previous picture that still isn't shown correctly:

enter link description here Link to full size

From the picture above you can see very different histograms on camera and in program.

One last thing that I noticed is when I took intentionally an underexposed photo, it produced dark greenish NEF, but when I took properly exposed photo the NEF looked pretty normal maybe a bit bleached out.


  • \$\begingroup\$ Are you sure that the images where exposed correctly in camera? How does the in ccamera histogram compare to the one genereated in the RawTherapee? \$\endgroup\$
    – Hugo
    Mar 2, 2015 at 21:32
  • \$\begingroup\$ Positive, The histograms are also very different on camera and in RawTherapee. On camera there are mostly midtones and shadows, but in RawTherapee there are only shadows. I also installed NEF codec from Nikon on my Windows and they are displayed in picture viewer correctly. \$\endgroup\$
    – danizmax
    Mar 2, 2015 at 21:51
  • \$\begingroup\$ That is strange indeed. The in camera histogram and the one generated from the unedited RAW file in the RawTherapee will look different, since the former is usually generated from a JPEG preview. They rarely differ much though. Can you set th camera to capture a JPEG and a RAW file and take a well exposed image spanning the entire histogram and provide both the RAW file, the JPEG and an image of the back of the camera showing the histogram to that image? Then we can help you easier. \$\endgroup\$
    – Hugo
    Mar 2, 2015 at 22:01
  • 1
    \$\begingroup\$ @Hugo I added picture from both histograms. \$\endgroup\$
    – danizmax
    Mar 2, 2015 at 23:14

4 Answers 4


Found it here in the RawTherapee documentation: In Colour Management, you can select an output and/or working colour space. Most likely, you selected one ending in _g10, which denotes a colour space with linear gamma.

RawTherapee's main histogram and clipping indicators will also be based on the output profile.

Ordinary sRGB has a gamma of 2.4 (actually usually 2.2, with a linear portion at the lower end, i don't know why RT's is 2.4), an image with 1.0 will appear much darker. This colour space has its advantages for special use cases, but normally, you'll want to use RT_sRGB for output and ProPhoto for working colour space.

  • \$\begingroup\$ I played with those settings, other than changing input profiles like working and output profile didn't change much. \$\endgroup\$
    – danizmax
    Mar 5, 2015 at 20:54
  • \$\begingroup\$ Don't Macs traditionally use a gamma of 2.4, and Windows PCs traditionally a gamma of 2.2? I could easily be wrong, but I recall reading that somewhere... \$\endgroup\$
    – user
    Dec 7, 2015 at 15:06
  • \$\begingroup\$ The link you provided is out of date. I think the page you meant to reference is here: rawpedia.rawtherapee.com/Color_Management#Input_Profile While I was able to improve the setup, the NEF file still looks way better in lightroom or in Geeqie on linux. I have started using Geeqie's jpeg export plugin for when I'm on linux. \$\endgroup\$ Nov 24, 2021 at 9:51
  • \$\begingroup\$ fixed the link. \$\endgroup\$
    – ths
    Nov 24, 2021 at 12:25

I overcame the problem by converting NEF files to DNGs with Adobes converter. And I conclude that RawTherapee just doesn't know how to handle NEF files properly, since AFAIK with DCP profile file it should work correctly.

While this is not a solution to the problem but a workaround, I'll leave an option open for others to solve the problem and this answer will server and alternative solution to help others.

The Solution

I came across THIS post and there was the answer to switch to 14-bit. I just tested and it work great now.


  • \$\begingroup\$ Unfortunately, that link is dead. \$\endgroup\$ Nov 24, 2021 at 9:38

I haven't directly experienced this, but have heard of cases where a camera setting for "protect highlights" (or similar) results in the camera deliberately under-exposing, then compensating for it in the JPEG engine while protecting the nicely captured highlights. This compensation, of course, will not be reflected in the RAW file, and software not provided by the camera company itself may not know to do this compensation either. You might want to check that possibility in your camera settings.


NEF files show the raw sensor data, which is linear. It is quite common that the maximum intensity in a NEF file might be a small area of highlight, and the main body significantly less. The different colors also have different sesitivities. Typically NEF files have a overall green cast if viewed without any adjustments.

This is all normal and as expected. There is plenty of dynamic range information left in the NEF file, even if everything appears to be 2 stops or more underexposed at first glance. Usually the first step I have my software do is find the darkest and brightest spots, and set them to black and white. You should also measure your sensor with sunlight and any other repeatable lighting condition you commonly use. This allows you to find what gray is with each of these lighting conditions and have the software adjust automatically. For example gray in sunlight with my camera has a relative weighting of (.541, 1, .694), which will obviously look green without correction.

Many of my NEF files look just like what you show before correction. Again, this is all normal and as expected.


To clarify, here is a picture from my Nikon camera shown thru some of the steps of post-processing.

Here is the NEF file interpreted to RGB but otherwise mapped directly to the 8 bit intensity space of the JPG file:

As you can see, this is dark and green. This looks a lot like the left image in your top picture, for the same reason.

Here is this same image with the darkest area mapped to full black in the output file and the lightest to full white, while keeping within the color balance for sunlight I previously measured for this particular camera:

The colors make more sense, but the linear mapping is still unnatural since only a few small highlights are anywhere near full white.

This is now fixed by applying a non-linear mapping of the intensity without changing the input values that result in black and white. In other words, the input range taken from the original is still the same, but the in-between values are no longer mapped linearly to the output image. This used a logarithmic correction of 3 f-stops, which means the darkest parts were expanded 8x more into the output than the lightest parts. I also added a "brightness" correction of .3, which brings up the dark areas even more quickly while having less of a effect on the light areas than the logarithmic correction does.

Anyway, the exact math isn't the issue, but that a non-linear mapping that expands the dark range while compressing the light range should be expected.

Now that I'm seeing this image surrounded by a fairly light background on this web page, I think I probably should have used a logarithmic mapping of 3.5 or 4 instead of 3. Context of the final image matters. If the image will be viewed projected on a screen in a dark room, or on a monitor with dark surround, then what I have above is probably better.

Anyway, I'm not going to keep playing with this image since the point has been made regardless of additional tweaks you might want to make to it.

  • \$\begingroup\$ RAW files don't show anything, unless interpreted by a RAW converter, which usually takes care of the correct scaling of the channels. \$\endgroup\$
    – ths
    Mar 3, 2015 at 15:20
  • \$\begingroup\$ @ths: Interpreting the data in a RAW file is of course interpreting the RAW format, just like other file types have to be interpreted too. Files never "show" anything, it's done by programs that read those files, but that's true of all image files, not special to NEF. If you take the raw information in a NEF file and display it as linear RGB, you get what I described. The OPs software is apparently defaulting to that int the absence of specific conversion mapping specified by the user. Software that does anything else automatically would be dangerous. \$\endgroup\$ Mar 3, 2015 at 15:28
  • \$\begingroup\$ dangerous? it's what virually every raw converter does per default. i sincerely doubt that lightroom shows NEF files dark and green. the fact that you cite the weights of your channels lets me suspect that you use dcraw for a manual workflow. \$\endgroup\$
    – ths
    Mar 3, 2015 at 15:35
  • \$\begingroup\$ @ths: By dangerous I mean the software applying adjustments I didn't explicitly state or give it permission to. Without any such adjustments, which should be the "blank slate" it should start with, NEF files tend to look dark and green. One of the first adjustments I usually apply is to map to the full dark/light range within the gray correction I've set. No, I don't use DCRAW. I mostly use my own software I have created for the purpose. \$\endgroup\$ Mar 3, 2015 at 17:39
  • \$\begingroup\$ Hey thanks for such extensive explanation, unfortunately it's still quite technical for me and I don't really understand what sliders should I use to adjust the colors. While I believe NEF raw data might be dark and greenish, I can't believe a RAW editor would not know how to compensate for that, and if maybe not out of the box, I believe with the help of DCP profile it should be able to do that. Or is DCP profile used for something else? \$\endgroup\$
    – danizmax
    Mar 3, 2015 at 21:28

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.