Support my work on Patreon

If you like my work, please consider to help my growing family with a little financial support through my Patreon creator page.

Alternatively, you can leave a one-time donation via PayPal using the Donate button below.

Total Pageviews

Tuesday, September 16, 2014

Tutorial: how to match the Nikon in-camera jpeg colors with photoflow

This tutorial will show you how to achieve a perfect color matching between the photoflow RAW processing and the in-camera Jpeg when reading Nikon NEF files. Or at least for D300 files, as this is the only camera I've carefully tested for the moment... However, I'm 90% sure that the method will give the same good results for other Nikon DSLR as well.

First of all, you will need to open a NEF file and add a RAW developer layer in order to process it; the details of how to do that can be found in my previous blog post, as well as the explanation of all the controls found in the RAW developer configuration dialog.

By defaul, photoflow interprets the linear RGB data of the RAW image using the standard Adobe color matrices, which give good and "correct" colors (possibly more "correct" than those produce by the camera).
Below I have put a first comparison between the result of Capture NX with the default in-camera settings, and photoflow with the in-camera WB and exposure and Adobe matrices for color rendering. Move your mouse pointer inside the image to see the photoflow version.

As you can see, the photoflow version lacks the "pop" of the in-camera image. Don't worry, we are going to fix that in few simple steps!

Step 1: extract the camera profiles from Capture NX(2) or View NX2

The final colors of the processed RAW image are determined by the input color profile. This profile, when combined with a suitable working profile, allows to "transforms" the linear RGB values from the camera into other RGB values that have a "well-defined" and camera-independent colorimeteric meaning.
Therefore, getting the "right colors" is mostly a question of using the "right camera profile". Fortunately for us, the Nikon software generates such profiles as temporary files whenever you open a RAW file for editing, so that w can save them for later use. There are several tutorials on the net that explain how to find those profiles on the hard drive; one good resource can be found on RawPedia.

One important detail to be kept in mind when creating the camera profiles using the Nikon software is that you need to switch off all enhancements, in particular the D-lightning if it was enabled in camera. Each time you do some changes that impact the camera color profile used internally by Capture/View NX, a new file will be created in the temporary folder; you should generally take the most recent one.

Different "Picture Control" settings will translate into different camera profiles: you can therefore create one profile for each of the settings (standard, portrait, landscape, neutral, etc.), and you will be able to mimic each of them in photoflow.

Step 2: load the profile in photoflow

Since we want to match the Jpeg image produced straight out of the camera, we should leave the WB mode to "CAMERA" and the exposure compensation to "0". Of course you are free to change those parameter if you are not satisfied with the result, but then your processing will obviously deviate from the in-camera image...

We now have to tell photoflow that it should use the Nikon camera profile to interpret the RAW image colors. To do that, you first have to open the RAW developer configuration dialog by double-clicking on the corresponding layer. Then go to the "Output" tab and change the "Color conversion mode" to "ICC". At this point, the preview window will most probably show a quite dark image: that's normal, since the camera profile is now undefined. Click on the "Open" button at the right of the "camera profile name" text entry, and select the Nikon profile in the file chooser dialog that will pop-up. At this the colors in the preview image should have changed, but still the image should appear very dark. This is because the Nikon color profile expects the RAW RGB values to be encoded with an sRGB tone curve instead of a linear one. The RAW developer dialog provides a drop-down selector, labelled "RAW gamma", which allows to choose the type of tone curve to be applied to the RAW data; three choices are provided:
1. "None": in this case the linear RAW data is not modified
2. "sRGB": an sRGB tone curve is applied to the linear RAW data
3. "Custom": a custom gamma curve is applied to the linear RAW data; you can set the slope of the gamma curve via the "Gamma exponent" value below the "RAW gamma" selector

As you might have already guessed, for Nikon profiles you have to choose option #2. Your RAW developer configuration dialog should look similar to this:

Et voila'! Your picture should now look exactly the same as the in-camera jpeg, at least in terms of colors. The image below shows a comparison between the result of Capture NX with the default in-camera settings and of photoflow using the Nikon profile and the sRGB tone curve (move your mouse pointer inside the image to see the photoflow version).
In fact, at this level the two pictures are indistinguishable!

Some soubtle difference appears if we look into the image at 100% scale. Below is a crop of the previous image, as usual you have to move the mouse into the image to see the photoflow version. The Capture NX version look a bit softer, even if I intentionally turned off any noise reduction. It seems that the open source Amaze demosaicing that is used by default in photoflow does really a good job in getting all the details out of the sensor data!

Now you can play with your preferred pictures using the nice and brigth original Nikon colors as a starting point...


  1. The link to RawPedia (which explains how to get the profile file) indicates the procedure works only with the previous version of viewnx2 (and therefore for the old models). Any suggestion for a d750 ?

  2. This comment has been removed by the author.

  3. Hi, I'm also looking for the d750 ICC profiles. Can't extract them from viewnx2. Any ideas how it will work?
    @philippe did you manage to get them?

  4. Hey nice post, thanks for sharing. I would like to share an awesome online file converter that can come handy.

  5. Really E-commerce Image Editing related article is very Useful and helpful .Lots of Thanks for sharing such a nice post.

  6. If the purpose is to edit or modify digital images, there are three types of photo editing programs available in the market today.remove image background They offer similar solutions, but they differ in the means by they can achieve the solutions.

  7. Each photographer will look for different things on a wedding day, and each wedding photographer will have a unique style but we all will follow a professional and meticulous formula for getting the wedding photos. wedding photographer

  8. Thanks a lot sharing such a useful information with us. I have found some other blogs with related to your information please check on Livejournal, Blogspot, Wix, Tumblr, WordPress & Weebly. Hope you like this and please keep sharing.

  9. Sparkle Photo Effect & Pip Editor&Sparkle effect - Masterlogix best app to make your photo fully attractive and heart touching.
    You can use four tools in this app with many effects like photo frames, overlays effects, twinkle effects, photo cropping, photo filters and photo borders in this best Photo Editor App - Pip Camera - Sparkle Effect (Blur)

  10. Blur Background Photo editor has auto background eraser. It will help you to remove particular color object in the background with single touch.Blur Background Photo editor has none background option. After remove background of your photo, if you don’t want to set any background to your photo you can choose none background option.

  11. I appreciate for this as there are so many ecommerce sites there from where you can purchase home furnitureMeeshan Home, you can compare products from sites like which will help you in purchasing a product if it is your first online shopping deal.