Fix Corrupted Nikon NEF Images
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,
D600, D800, D800E, D3200 and D7100.†
To fix your damaged NEF images, follow the instructions below for
Windows or Mac / Linux systems.
See this thread
in the ExifTool forum if you have any questions or comments.
[Note that Nikon doesn't learn from their mistakes, and a similar problem
happened 2 years ago with an older version of Nikon Transfer and the D5000 --
read here.
The moral is: Don't use Nikon Transfer or any other utility that modifies the file
to download your precious images!]
† Currently only FX-format NEF images
are supported for the D4, but support for DX images may be added if there is a
demand. Both FX and DX formats are supported for the D600 and D800.
Windows Users
- Download and open "fix_corrupted_nef_win.zip", then move the
"fix_corrupted_nef.exe" application onto your hard disk.
- Drag and drop the corrupted NEF files and/or folders onto
the "fix_corrupted_nef.exe" application.
- A command window should open and prompt with this message:
"Bit depth of compressed images (12 or 14) [14]?"
Type either "12" or "14", then press RETURN. If you don't know the
bit depth of your compressed NEF images, or if you have mixed 12
and 14-bit compressed images, or if you have only uncompressed NEF
images, just type "14" (or simply press RETURN). If this is wrong
for some images, you will not be able to open the fixed images
(but you can delete these and re-generate them with the other bit
depth later). Note that this number is ignored for the D3200 since
it produces only 12-bit compressed images.
- The application should now run and create a "fixed" folder beside
each of the original NEF images. This folder contains the fixed
NEF images with the same names as the originals.
- Verify that you can open the fixed NEF images. If you can't open
any of the images, delete them and go back to step 2, but this time
select the other bit depth in step 3. (Only the images you deleted
will be re-generated, the others won't be touched.)
With any luck, the mess that Nikon Transfer 1 caused is now fixed, and
all of your NEF images are now restored!
If you are feeling so happy that you absolutely must send me a
donation, this can be done from the ExifTool home page.
- Phil Harvey
Mac / Linux Users
- Download and expand "fix_corrupted_nef.zip" into a directory on
your hard disk.
- Open a Terminal window.
(on Mac, launch /Applications/Utilities/Terminal)
- Drag and drop "fix_corrupted_nef.pl" onto the Terminal window.
(Note: The distributed "lib" folder must exist in the same folder
as the "fix_corrupted_nef.pl" application. If you moved
"fix_corrupted_nef.pl" to a different folder you must also move its
"lib" folder to the same place before running.)
- Drag and drop the corrupted NEF files and/or folders onto
the Terminal window.
- Select the Terminal window, then press RETURN on the keyboard.
- You should see this prompt:
"Bit depth of compressed images (12 or 14) [14]?"
Type either "12" or "14", then press RETURN. If you don't know the
bit depth of your compressed NEF images, or if you have mixed 12
and 14-bit compressed images, or if you have only uncompressed NEF
images, just type "14" (or simply press RETURN). If this is wrong
for some images, you will not be able to open the fixed images
(but you can delete these and re-generate them with the other bit
depth later). Note that this number is ignored for the D3200 since
it produces only 12-bit compressed images.
- The "fix_corrupted_nef.pl" application should now run and create a
"fixed" folder beside each of the original NEF images. This folder
contains the fixed NEF images with the same names as the originals.
- Verify that you can open the fixed NEF images. If you can't open
any of the images, delete them and go back to step 3, but this time
select the other bit depth in step 6. (Only the images you deleted
will be re-generated, the others won't be touched.)
With any luck, the mess that Nikon Transfer 1 caused is now fixed, and
all of your NEF images are now restored!
If you are feeling so happy that you absolutely must send me a
donation, this can be done from the ExifTool home page.
- Phil Harvey
Revisions
2013-05-16 - Version 1.6 - Added support for D7100 images and D800 5:4 cropped images
2013-03-26 - Version 1.5 - Added support for D600 DX images
2013-01-15 - Version 1.4 - Added support for D3200 images
2013-01-07 - Version 1.3 - Added support for D800 DX images
2012-11-03 - Version 1.2 - Added support for D600 FX images
2012-09-26 - Version 1.1 - Added support for D4 FX images
2012-09-08 - Version 1.0 - Initial release (fixes D800 FX images)
Created Sept. 8, 2012
<-- Back to ExifTool home page