0

I have one NEF file that's showing perfectly fine in ViewNX-i but that displays blue or green color banding at the bottom of the image with every other tool I throw at it (MacOS X Sierra 10.12.4 Preview, DxO OpticsPro 11, RawTherapee, DarkTable). Apparently even LightRoom/PhotoShop can't open the file without displaying banding at the bottom (confirmed by DxO support).

So I suppose it's either a bit error in the RAW data stream or a data encoding mode not (yet / correctly) supported by popular NEF decoding libraries.

The main issue is that I can't use the file in my preferred workflow application (DxO OpticsPro) or in any of its acceptable substitutes (LightRoom/PhotoShop, DarkTable, RawTherapee).

The source file can be downloaded from here.

Knowing that ViewNX-i can display the image without errors, is there a way I could 'repair' this RAW file? So far I could not find a means in ViewNX-i to re-encode the RAW file. Neither did ViewNX-i let me know if there was an actual error in the file.

This question differs from other similar questions (e.g. How to repair demaged .nef files?) since at least one tool is able to correctly render the image.

  • What happens if you export it from ViewNX as a tiff? tbh, that's my preferred method anyway, stops photoshop's camera raw from messing up the colour & you can still edit most RAW parameters from a tiff in Photoshop. – Tetsujin Apr 24 '17 at 10:01
  • Exporting the NEF file to TIFF in ViewNX-i apparently also displays (greenish) banding. So the decoding error is only corrected while viewing a NEF file in ViewNX-i. – ShutterFreak Apr 24 '17 at 10:21
  • 3
    At a pure guess, it may only be showing you the uncorrupted jpg then. – Tetsujin Apr 24 '17 at 10:22
  • Not sure since I set my DSLR to store images as RAW (14 bit) only, no JPEG processed image is embedded in the NEF file. And I can zoom in on the image with ViewNX-i without seeing the blue/green banding I see in other tools. – ShutterFreak Apr 24 '17 at 11:40
  • 1
    A NEF contains a jpg, even if you don't tell the camera to save both. Try something like File Juicer to split it out, or attempt conversion to other types. – Tetsujin Apr 24 '17 at 12:50
1

Upon inspection with the free command-line ExifTool it appears that the image I referred to in the question contains a valid full-size JPEG image as well as a corrupt RAW image. The JPEG image was extracted as follows from the NEF file:

$ exiftool -b -JpgFromRaw -w _jpeg_from_raw.jpg -r DSC_5037.NEF
Warning: [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto - DSC_5037 (PC).NEF
    1 output files created

It appears that some image viewers - apparently also Nikon ViewNX-i - don't bother decoding the RAW image data when rendering the images on a display. This gives the impression that they can heal the otherwise corrupt RAW image data. When such tools perform image conversion operations, they however touch the RAW image data, hence their output renders the image corruption artifacts.

So unless there's a smart RAW image data editor (bitwise stream editor) I don't think it is possible to fix such errors.

It however makes the case for adding error correction bits into the RAW stream one day.

  • 1
    ViewNX-i does render raw if you ask it too, if you look you'll see a "RAW" button to make that happen. – Linwood Apr 24 '17 at 20:41
  • Apparently, but not by default. On OSX the "RAW" button appears at the top left of the ViewNX-i frame. – ShutterFreak Apr 25 '17 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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