FixNEF

- Changing White Balance in Nikon Capture Hurts Your Pictures! -

Screen Shot

What it Does

Nikon DSLRs store white balance setting as two rational numbers in NEF files. FixNEF lets you change these values. It will never alter your original file. FixNEF always creates a copy of a source NEF file and changes are applied only to the copy. FixNEF does not support D2X (or later cameras) and D1 NEF files.

Why You Need FixNEF

Have you ever noticed that the colors near highlight turn to ugly cyan or orange, when you change WB in Nikon Capture? Have you noticed that you can't fix badly white balanced shot even though you shoot in raw and used flash? You probably have thrown away hundreds of your pictures due to this problem. This is not because your camera or your skill sucks. This is all because of inaccurate Nikon Capture's White Balance tool.

Why do we shoot in raw? We want to concentrate only on subject, composition, exposure, depth of field...etc. We don't want to waste our valuable time and effort on white balancing with gray card every time we take a picture, and we don't want to keep guessing which camera setting will make a better picture, either. We want to be able to override every signle camera setting later when we process our pictures with a raw converter.

When you take a picture in raw, all of the camera settings, including white balance setting, are stored in raw file header. White balance setting is stored as blue and red gain values. No matter what white balance setting you use in camera, the actual raw data will never be affected (D2X is an exception.). Therefore, you should be able to fix any badly white balanced shot as long as you shoot in raw, theoretically. However, Nikon Capture does not allow you to override the camera WB setting completely!

I'm not 100% sure as I didn't write Nikon Capture, but it seems that Nikon Capture adjusts the WB of a picture in two phases: The WB settings read from an NEF file are applied first, then the settings in Nikon Capture's WB tool are applied on top of that. The latter may or may not immediately follow the former. I do not know the inside detail of Nikon Capture but it seems that the first WB adjustment works well, but the second one doesn't, especially when you try to fix a badly white balanced picture.

Some examples here,

This shot was taken at the University of Toronto, Canada. I used my D70's auto white balance as I thought that I would be able to correct the white balance later.

I opened up the picture in Nikon Capture and tried to fix white balance using "Set Gray Point". However this is the best Nikon Capture could do.

I used the same red and blue gain values in Nikon Capture's WB tool for R2 and B2 in FixNEF. Huge improvement, eh? :)

This issue is not limited only to badly white balanced pictures. For high contrast pictures, even a small change of WB in Nikon Capture will seriously destroy color balance near highlight areas. I have also seen many examples how white balance change in Nikon Capture can easily damage overall color balance of a picture. You probably wouldn't believe what I say here because you have never seen what your pictures are supposed to look if processed properly.

FixNEF solves this issue by modifying WB setting in an NEF file so that no further WB change is needed in Nikon Capture. If used as instructed, FixNEF will merge two white balance settings: one from NEF file, the other from Nikon Capture's Gray point tool. And it will create a copy of your NEF file and write a merged WB setting into it. This newly generated NEF will be perfectly white balanced, so you will not need any WB change in Nikon Capture.

Comment on Encrypted D2X White Balance Information

FixNEF does not support D2X because the white balance information is encrypted. In fact, I do not consider it an encryption. If the key is delivered with the ciphertext, how one can call it an encryption? A locked door with a key put in is considered an open door, not a locked door. Encryption is different from scrambling. The former outputs ciphertexts, while the latter outputs plaintexts. No matter how complex the scrambling is, if it is not a "strong cipher", it can always be broken by reverse engineering. Encryption cannot be broken even though one knows how the internal algorithm works unless he/she knows the secret key. Encryption is like keeping some information in a good safe. We consider a safe as a good safe, if it cannot be opened without a key even though its complete internal design is known.

As we all know, David Coffin revealed how to decrypt white balance info in dcraw.c. So it seems to me that it will take less than an hour to make FixNEF to work with D2X raws by using his algorithm. However, I do not intend to make FixNEF support D2X NEF, because I don't want to take the risk of getting sued by Nikon. (I highly doubt that they will actually sue me.) I will not make FixNEF work with any camera raws that has encrypted white balance info.

Nikon, you seem to sound like you are protecting your customers from getting wrong outputs by using wrong converters or wrong programs like FixNEF. You are totally misleading and fooling your customers. There are evidences that Nikon Capture prevents people from getting the most of raw format. Here, I have proven that Nikon Capture sometimes produces miserable outputs. According to Raw Magick, Nikon Capture does not allow that the embedded custom curve be changed. (For those who do not know, actually embedding a custom curve in NEF format produces different results from applying curve in Nikon Capture.) It also seems that the Nikon SDK is not good or suitable enough to be used in real applications and Adobe is not willing to use it. (See what Thomas Knoll said) Is there any real applications which use Nikon SDK? Let me know if there is any, except for Nikon Capture. What are you trying to do Nikon? Sell more Nikon Capture?

See what nikon responded to encrypted WB concerns

More Examples


Original picture (in-camera preset WB)


White balanced in Nikon Capture (used gray point)


Corrected by FixNEF


Original picture (in-camera preset WB)


White balanced in Nikon Capture (used gray point)


Corrected by FixNEF


Original picture


White balanced in Nikon Capture (used set gray point tool)


Corrected by FixNEF. I know the difference is very subtle and it is hard to observe it in this small size. But there IS a difference. Prints make it evident. In Photoshop CS, I stacked the two pictures as layers, set "difference" blending mode, merged, and applied "auto level". See the picture below...

Does Nikon Capture compromise a little quality in exchange for better speed and/or memory management?

This is a cropped part of a picture. I slightly overexposed and blew out some details in this shot. (I didn't care about white balance when I shot this picture.) I tried my best to cover up this blown highlight part in Nikon Capture, but I couldn't do any better than this because adjusting the white balance in Nikon Capture left this ugly color at clipped highlight. Well, I could simply push this blown part to pure white - (255,255,255), but I didn't do it because it would have clipped other part of the image. Moreover, pure white surface is a very evil thing for inkjet print especially on a glossy surface. Pure white means "no ink" and it causes gloss differential problem for most pigment based printers, except for Epson R800 and R1800.

I let FixNEF to correct this problem and turned off Nikon Captures White Balance Tool. The blown part is pretty neutral now! The difference is not subtle. It is actually a significant difference to me because I'm a print fanatic. Note: prints can signify whatever defects your pictures may have. (If you don't see the difference, then your monitor is incapable of showing it.)

Recently, I have found that FixNEF is extremely useful for IR photography, because IR photos usually need significant white balance change. Some examples how FixNEF can help IR photography will soon be added to this page.

How to use FixNEF

Known Issues

FixNEF does not work on D1 NEF files.

Bug Report

I only have Nikon D70. FixNEF seems to work pretty well with D70 NEF, since FixNEF has been thoroughly tested with D70 NEF files. However, I tested FixNEF with only 2~3 sample NEF files from other Nikon DSLRs, so it might not work well for some cases that I'm not aware of. If FixNEF does not work on your NEF files, simply send the not working NEF file to me by email (click top left corner of the program and open "About FixNEF").

Download


Other Useful Software and Links for Nikon DSLRs

Preview Extractor - Extracts embedded JPGs from RAW files
Truth about Nikon Compressed RAW

Thank You for Your Support!

Date Name AmountComments
February 28, 2007John RodgersUS $10 
February 27, 2007Susan ModakUS $10 
February 26, 2007Croft RandleUS $5 
February 8, 2007Michael HugganUS $20 
January 19, 2007Ken JacksonUS $5 
August 22, 2006Pamela M. RyanUS $10 
July 11, 2006Richard WattsUS $20 
July 5, 2006Steven StoneUS $5 
June 14, 2006Eric LeeUS $15 
June 7, 2006Francesco MenzeraUS $20 
June 5, 2006Guglielmo BragugliaUS $10 
May 7, 2006Karl UlrichUS $5 
May 5, 2006Scott StrawnUS $20 
March 21, 2006Jerry GodwinUS $20 
March 11, 2006Amedeo TommasiUS $10 
March 6, 2006Augusto Olivares RomoUS $10 
January 14, 2006Ross AlfordUS $10 
December 13, 2005Christian WasmeierUS $5 
November 11, 2005Nicola DinapoliUS $20 
November 10, 2005Thomas EngstromUS $10Preview Extractor, wonderful!
September 27, 2005Philippus FahrenfortUS $25 
June 25, 2005Lee, Hyun PyoUS $10 
June 2, 2005Henry SluderUS $10 
May 29, 2005Steven A. Dingeldein, M.D.US $15 
April 7, 2005Fabian Gonzales PhotographyUS $10 
Mar 7, 2005Richard DerkxUS $10thanks for sharing your work
Mar 5, 2005Ian GilbertUS $25 
Mar 3, 2005Michelina HamiltonUS $10 
 David ElfstromUS $10 
Jan 28, 2005Shang-Yu LiuUS $10 
Jan 18, 2005Dennis PriebeUS $20 
Jan 13, 2005Robert OverlockUS $20 
 Gennady GurovUS $15It would be awesome to get exif info transfered over to the jpegs
Jan 10, 2005 Andrew Levacy US $5  
  David Hofmann US$15  

See statistics