TransWikia.com

How can I repair a corrupt .nef file?

Photography Asked by Alex Tozer on July 9, 2021

I took about 100 shots using a Nikon D7000 on a 4GB memory card this weekend, shooting in RAW. I checked the pictures after the first 5 and all looked fine, so I kept shooting. After taking about 95 pictures (in relatively quick succession) of a series of formal shots I clicked the viewer to check all was ok. There was a blank screen with “no image”. I can see every file on the SD card (there are about 100 files, all about the right size – 19-21mb) but I can only open the first 6 in ViewNX2, or any other program.

I’ve tried various image recovery programs but they are all geared towards recovering lost (i.e. deleted) data. I can see the files, so the data must be there, but I just can’t view or open the pictures.

Has anyone had experience with this or could anyone point me in the right direction?

5 Answers

I haven't had much luck recovering the raw files themselves, but I've seen several instances of problems like this where I was able to extract the JPG preview that's embedded in the RAW file. Believe it or not, the best program I've found for grabbing these JPGs is Irfanview - a great little free tool. Any JPG you grab in this fashion won't be of the same quality as your RAW file would, but it beats nothing at all.

Answered by D. Lambert on July 9, 2021

No, the data doesn't have to be there. That is in fact the likely problem. The SD card failed, garbled some bits, and now programs that understand NEF files can't make any sense of them. Try using one of those TIF diagnostic programs that shows you every tag in the file. If you're really lucky the image data is intact and the rest can be reconstructed. Probably not though, since the image data is the bulk of the bits.

Answered by Olin Lathrop on July 9, 2021

You could try to run some program on your memory card, lik PhotoRec to verify if it could recover more information than you already got.

But it's not that easy to use...

good luck!

Answered by woliveirajr on July 9, 2021

I do not have any .NEF file to try this on, but exiftool's Phil Harvey has a website called "Fix Corrupted Nikon NEF Images". It states:

Downloading NEF images from newer Nikon cameras with Nikon Transfer 1 or older versions of ViewNX 2 (and probably Capture NX 2) may result in corrupted NEF images that can no longer be opened.

This utility repairs these corrupted NEF images for the D4, Df, D600, D610, D750, D800, D800E, D810, D850, D3200, D5200, D5300, D5500, D7100 and D7200.

It DOES NOT REPAIR images corrupted by memory card problems, disk errors, or other software. [Nikon NX-D has also been known to corrupt images (possibly related to changing the file byte ordering!), but these problems are not fixed by this utility.]

Warning! If you modify the corrupted images with any other software before fixing them with this utility, then the raw image data may be permanently lost! (This may happen for instance if you use View NX2 to geotag the images after downloading.)

So while it does not officially state the D7000 as supported, it might still work. Be careful, though, to make a backup of the file before trying this solution!

Answered by flolilo on July 9, 2021

You'd need to check the files using something like HxD

If files consist of only zeros they can not be repaired nor recovered. This is something that typically occurs when using a fake card (advertised capacity exceeds actual NAND capacity).

If non zeros it may very well be impossible to repair the actual NEF files, but often a full resolution JPEG can still be extracted. Problem is most tools that normally can, can not if header of the file is corrupt. There are tools that can, or claim that:

  • Stellar Repair for Photos (tends to only extract medium sized JPEG)
  • JPEG-Repair Toolkit (which I am author of)

Note that these tools are not freeware.

Fake cards:

As mentioned these claim more capacity than actual NAND capacity. How does this go unnoticed?

  • First of all firmware is 'hacked' so it suppresses errors when writing/reading to/from non existing memory.
  • Second, the file system structures pointing to the actual file data are typically located towards the start of the file system. So, located in actually present memory. So even if file data is 'saved' to non existing memory, and card reports 'everything went well', a directory entry is created and FAT is updated without issue.

Same is true when you try to view your photos even using a card reader: Mac or Windows can show directory listing and even read the non existing memory as the card again reports, all is well.

Answered by Joep van Steen on July 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP