Nikon D800 NEFs ==> SubIFD Tags corrupted ==> Rewrite possible?

Started by spark, June 29, 2012, 11:09:04 AM

Previous topic - Next topic

drjazz

Hi Phil -

that's cool! Thank you very much for your effort...
I'll give it a try!!

cpaulPHL

Slightly different problem here - Nikon NEF files that were edited with Capture NX 2 can be displayed in View NX 2, but can no longer be converted ("unsupported file type").
Many of these NEF files were created with a Nikon D60, which isn't supported in the "fix_corrupted_nef" utility.
Any idea what Capture NX 2 might be doing to "corrupt" these NEF files? I tried removing all adjustments and SAVE AS in NX 2 but no luck...

Thanks in advance!
- Paul

Quote from: Phil Harvey on February 17, 2016, 12:31:51 PM
Hi William,

If they were corrupted by Nikon software, then send me one of the files and I'll see if it is possible to fix with this utility.  If so, then I will require more samples shot at various compression settings to be able to add support.  My mail is philharvey66 at gmail.com

- Phil

Phil Harvey

Hi Paul,

The usual thing that goes wrong is the RAW data IFD is converted into one for a JPEG preview.  The raw data is still there in place of what should be the JPEG image.  You can check to see if this is the case by comparing the tags in SubIFD1 between a good and bad image:

exiftool -a -subifd1:all FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

nikonnewbie

Hi - would it be possible to add MD5 and/or SHA1 checksums for the  "fix_corrupted_nef_win.zip" file? Perhaps just add it to the same page for the regular ExifTool? Thx. Apologies in advance if it is already posted somewhere I didn't see yet.

thanks so much.

Phil Harvey

Here they are.  I don't know if I like them on the main ExifTool page.

SHA1(fix_corrupted_nef-3.2.zip)= be8dc602c6508699667ceb2f10862bed9cf514f2
SHA1(fix_corrupted_nef_win-3.2.zip)= 8e64caf8a66a7608c910621ce03af8a2742a441d

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

nikonnewbie

Hi thanks so much! I have a quick follow up question.

On https://sourceforge.net/projects/exiftool/files/ I see the files:

fix_corrupted_nef_win-3.3.zip
fix_corrupted_nef-3.3.zip

From https://exiftool.org/fix_corrupted_nef.html the files are:

fix_corrupted_nef_win.zip
fix_corrupted_nef.zip

I checked the Mac/Linux versions and they match each other (presumably version 3.3) but it does not match the version you mentioned (version 3.2). Is 3.3 the latest version? If so, would you mind providing those checksum?

Thanks again in advance.

Phil Harvey

Sorry, you're right.  The current version doesn't have a version number on the ExifTool web site. Here are the sha1 hashes for these files:

SHA1(fix_corrupted_nef.zip)= 72a0135f7cebd1909c657495dc501d02407be5b9
SHA1(fix_corrupted_nef_win.zip)= 10d1423c79eade0a61270210b73d4aaade0b98c6

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

nikonnewbie

Hi, thank you again for that, it now matches for me.

I have some older NEF files which I could not view a thumbnail or open and view with any application and I found your utility which I was hoping would help. I know at the time I used the Nikon software to transfer and edit some of the photos I took back then.

The tool gave me an error (file format error) so I used ExifTool to display the tag info and it gives me an error for these files, "Entire file is binary zeros"  ??? . So I just used a the command XXD to dump out the files in hex and binary and they are indeed, zeros. So I have no idea what may have happened. Fortunately, it's not too many of them.

This did, however give me an opportunity to learn a LOT more about the ExifTool itself!

Thanks again for your quick replies.