Bad MakerNotes offset for NEFBitDepth

Started by majo44, July 15, 2010, 07:52:48 PM

Previous topic - Next topic

Hayo Baan

Hi Phil,

I did some more research and while I still have not found the exact cause, the fact that all those 122 bad files where processed early on in my switch to DNG may indicate it was an older version of the Adobe DNG converter or ACR/Lightroom software (or even PhotoMechanic, though I doubt that) that may have caused this.

I have now manually reconverted these images (I still have the original raw files for all my images!)and reapplied the metadata and edits (simply synchronising them is PM and ACR), so my DNG files are all without errors now  :)

Ill keep watching this and when I do find a likely cause, I'll report it.
(note: this whole exercise has triggered me to have a look at the warnings more closely and have found files with other minor metadata issues, perhaps time to fix those too :-\)
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Hayo,

Well, it is reassuring if indeed the problem was fixed in the software that was causing it.

- 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 ($).

Hayo Baan

#17
Hello Phil,

Good news (in a way). Thinking about the files that suffered from the issue a bit longer, I thought, "hey weren't those the ones I opened from the (already edited) .nef and then saved as .dng within ACR?"

So I just tried recreating the issue by opening a .nef and then saving it as .dng. And, lo and behold!, the thus created .dng indeed suffered from the bad offset problem. Time to report a bug to the Adobe team (perhaps they fix it as quickly as they did with the support for some (e.g. D200) lossless compressed .nef files ;) )

Additional info: I have reported this as a bug on the Adobe forums.

Cheers,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Hayo,

I can't check your link from home (the web page it far to heavy for dialup).  When you say "edited NEF", what did you edit it with?

- 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 ($).

Hayo Baan

Hi Phil,

Wow, hadn't realised you could still be on dialup. Dialup is something of the past for us here (in the Netherlands); everyone is at least at multi Mbs cable or ADSL, and have been for years now. I do still remember dialup and the happiness I felt when I could combine the two ISDN lines we had then to form one 128kbs connection. Ah, those were the days  ;D Anyway, some of the websites (Adobe's amongst them) do not really consider dialup any longer and bloat their site with heavy graphics.

Anyway, here's the text of the problem I posted:
QuoteDNG files created from raw files previously edited in Nikon Capture NX2 results in corrupted (makernote) metadata
When creating a DNG file from a file that has already been edited with Nikon Capture NX2, the rsulting DNG file will contain corrupted maker note data.
(this can easily be verified by running ExifTool on the file: you'll get a message stating that the file has a "Bad NikonScanIFD SubDirectory start")

Hopefully this can be easily fixed as this hampers switching to DNG (and ACR) for my older files quite considerably...

To answer your question, I meant editing them with NX2.
Which leads me to another question, is it possible to remove just the MakerNotes:NikonCapture portion of the MakerNotes?
When I tried this with -MakerNotes:NikonCapture= , I got Warning: Tag 'NikonCapture' does not exist and when I tried -MakerNotes:NikonCapture:*=, it told me Warning: Can't delete PhotoEffectHistoryXML :(

Thanks,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Hayo,

Quote from: HayoBaan on June 22, 2014, 04:41:48 AM
Wow, hadn't realised you could still be on dialup. Dialup is something of the past for us here (in the Netherlands);

Yeah.  Canada is too big.  Where I live in the country, there are a few options (wireless, cell, satellite), but they are all too expensive for me and/or would require cutting down of trees to get reception. :(

Quote
Which leads me to another question, is it possible to remove just the MakerNotes:NikonCapture portion of the MakerNotes?
When I tried this with -MakerNotes:NikonCapture= , I got Warning: Tag 'NikonCapture' does not exist and when I tried -MakerNotes:NikonCapture:*=, it told me Warning: Can't delete PhotoEffectHistoryXML :(

Did you forget to put quotes around the argument containing the '*' ?

The group delete syntax supports only a single group name.  So the syntax would be -nikoncapture:all=.  But I don't know why you are deleting the NikonCapture information.  The bad NikonScanIFD will be removed when you write anything to the file with ExifTool.  This likely won't cause any problems.  However, you also got an error "Bad MakerNotes offset for NEFBitDepth", which is more serious.  Corrupting this information may cause problems.

- 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 ($).

Hayo Baan

Quote from: Phil Harvey on June 22, 2014, 07:15:10 AM
Yeah.  Canada is too big.  Where I live in the country, there are a few options (wireless, cell, satellite), but they are all too expensive for me and/or would require cutting down of trees to get reception. :(

I see, dialup is the best solution then. Hopefully you get at least some decent speed out of it.
(Note: even in the Netherlands, though very uncommon, there are some places with problems similar to yours)

Quote from: Phil Harvey on June 22, 2014, 07:15:10 AM
Quote
Which leads me to another question, is it possible to remove just the MakerNotes:NikonCapture portion of the MakerNotes?
When I tried this with -MakerNotes:NikonCapture= , I got Warning: Tag 'NikonCapture' does not exist and when I tried -MakerNotes:NikonCapture:*=, it told me Warning: Can't delete PhotoEffectHistoryXML :(
Did you forget to put quotes around the argument containing the '*' ?

Actually as I don't have any files that match the *, the shell wouldn't expand the * anyway, so it doesn't matter (though safer would have been to use them, I know)

Quote from: Phil Harvey on June 22, 2014, 07:15:10 AM
The group delete syntax supports only a single group name.  So the syntax would be -nikoncapture:all=.

Excellent, the -nikoncapture:all= seems to work just fine.

Quote from: Phil Harvey on June 22, 2014, 07:15:10 AM
But I don't know why you are deleting the NikonCapture information.  The bad NikonScanIFD will be removed when you write anything to the file with ExifTool.  This likely won't cause any problems.  However, you also got an error "Bad MakerNotes offset for NEFBitDepth", which is more serious.  Corrupting this information may cause problems.

Well, I was looking for a way to safely remove the Nikon Capture NX2 edits so I would prevent the corruption by the conversion to DNG.

Now I was able to delete the NikonCapture information, I found out something interesting: not only did it work as I hoped (the DNG from the file without the Capture info now contains no corruption), the DNG converter was in fact able to properly convert all the intermediate test files where exiftool had regenerated (and reordered) the metadata! Awesome :)

So basically I have a good approach available for when I want to edit some of my older nefs (i.e., the ones with NX2 edits) and convert them to DNG. I will simply delete the NikonCapture info (as that is totally unnecessary metadata for ACR) right before I open the file in ACR or convert it to DNG. Sure, not as convenient as being able to open the file in ACR directly and do a save-as DNG there, but still workable for me  :)
Of course, if Adobe feels it is worth it to fix their conversion problem, I wouldn't even need this work-around (but then I may still want to delete the NikonCapture info as it is unnecessary ballast.

Thanks for helping me find this solution (and giving me even more insight in ExifTool's workings).

Cheers,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Hayo,

Quote from: HayoBaan on June 22, 2014, 08:03:23 AM
Actually as I don't have any files that match the *, the shell wouldn't expand the * anyway, so it doesn't matter (though safer would have been to use them, I know)

Just checking, because I didn't remember a tag called PhotoEffectHistoryXML.  But searching for it now, I do find it in the NikonCapture information. So I understand what was happening.  This note in the app doc explains the situation:

            4) Specifying "-GROUP:all=" deletes the entire group as a block
            only if a single family 0 or 1 group is specified.  Otherwise all
            deletable tags in the specified group(s) are removed individually
            [...]


... but maker note tags like NikonCapture may not be deleted individually.  So this doesn't work.

Quotenot only did it work as I hoped (the DNG from the file without the Capture info now contains no corruption), the DNG converter was in fact able to properly convert all the intermediate test files where exiftool had regenerated (and reordered) the metadata! Awesome :)

Interesting.  I was thinking that just touching the NEF with ExifTool (without deleting the NikonCapture info) may solve the problem.  This makes sense since it could be something screwy that NikonCapture is doing, unrelated to the fact that the file contains NikonCapture information.

QuoteI will simply delete the NikonCapture info (as that is totally unnecessary metadata for ACR)

If you don't need it anyway, then this is a good solution.

- 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 ($).