Author Topic: 4.6: adjusting NEF IPTC time corrupts file?  (Read 3400 times)

Offline jneun

  • Newcomer
  • *
  • Posts: 9
    • View Profile
4.6: adjusting NEF IPTC time corrupts file?
« on: February 02, 2009, 06:39:14 PM »
D70 NEF, adjusted time offset by +5 hours.  File cannot be opened by CaptureNX 2 or PS CS3.  Capture NX2 says "... could not be loaded because there is not enough memory"  Worked prior to time offset operation.

Jan Erik

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24763
    • View Profile
    • Camera Bits, Inc.
Re: 4.6: adjusting NEF IPTC time corrupts file?
« Reply #1 on: February 02, 2009, 06:43:43 PM »
Jan,

D70 NEF, adjusted time offset by +5 hours.  File cannot be opened by CaptureNX 2 or PS CS3.  Capture NX2 says "... could not be loaded because there is not enough memory"  Worked prior to time offset operation.

Did you use the IPTC Info dialog?  Or the Adjust Capture Times dialog?  Are you on Mac OS X or Windows?

Can you send us (upload) a sample file with this issue?

Thanks,

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24763
    • View Profile
    • Camera Bits, Inc.
Re: 4.6: adjusting NEF IPTC time corrupts file?
« Reply #2 on: February 03, 2009, 01:29:17 PM »
Jan,

Jan,

D70 NEF, adjusted time offset by +5 hours.  File cannot be opened by CaptureNX 2 or PS CS3.  Capture NX2 says "... could not be loaded because there is not enough memory"  Worked prior to time offset operation.

Did you use the IPTC Info dialog?  Or the Adjust Capture Times dialog?  Are you on Mac OS X or Windows?

Can you send us (upload) a sample file with this issue?
Adjust Capture Times dialog.  Windows XP.  File can be uploaded.  Attached if it works.

OK, we've got the file.  I'm deleting your posting so people don't keep on downloading your file.  Also, we would like a file that is at the state you had this sample just before you used the Adjust Capture Times dialog.  Can you provide us with one of those?  Please click on my name to the left of this message, then click on the 'personal message' link.  I will respond with upload instructions.

Thanks,

-Kirk

Offline dennis

  • President
  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 462
    • View Profile
    • Camera Bits, Inc.
Re: 4.6: adjusting NEF IPTC time corrupts file?
« Reply #3 on: February 03, 2009, 03:18:24 PM »
Jan,

It looks this file was in a bad state before PM modified it.  I think it was created by ViewNX 1.0 on Windows, but there is also a MicrosoftPhoto rating in the XMP so I don't know its full history.

But if you revert the NEF in PM it will go back to the original.  :)

It appears this corruption happened because of an IPTC update, not the capture times per se.  IOW you probably had checked the option to update the IPTC/XMP time as well.

In the original file (i.e. after reverting), the IPTC tag was not properly inserted in the NEF's TIFF table.  The TIFF tags are supposed to be in numerical order, and for some reason the IPTC tag (0x83bb) was written after the Exif tag (0x8769) instead of before it.  This causes PM 4.6 to malfunction when updating the TIFF table (it inserts another IPTC tag causing the last TIFF tag and next IFD pointer to become corrupted).  This probably didn't happen in PM 4.5.x because when it inserts TIFF tags it searches from the end of the TIFF table (not from the front as in 4.6) and therefore just updates the existing IPTC tag.

I will fix this in the next PM 4.6 build, but some software you are using is not properly writing the NEF file.  Maybe this was a bug in View NX 1.0 (Nikon is up to version 1.2.2 on Windows).

--dennis



Offline jneun

  • Newcomer
  • *
  • Posts: 9
    • View Profile
Re: 4.6: adjusting NEF IPTC time corrupts file?
« Reply #4 on: February 03, 2009, 05:42:54 PM »
Jan,

It looks this file was in a bad state before PM modified it.  I think it was created by ViewNX 1.0 on Windows, but there is also a MicrosoftPhoto rating in the XMP so I don't know its full history.

But if you revert the NEF in PM it will go back to the original.  :)

It appears this corruption happened because of an IPTC update, not the capture times per se.  IOW you probably had checked the option to update the IPTC/XMP time as well.

In the original file (i.e. after reverting), the IPTC tag was not properly inserted in the NEF's TIFF table.  The TIFF tags are supposed to be in numerical order, and for some reason the IPTC tag (0x83bb) was written after the Exif tag (0x8769) instead of before it.  This causes PM 4.6 to malfunction when updating the TIFF table (it inserts another IPTC tag causing the last TIFF tag and next IFD pointer to become corrupted).  This probably didn't happen in PM 4.5.x because when it inserts TIFF tags it searches from the end of the TIFF table (not from the front as in 4.6) and therefore just updates the existing IPTC tag.

I will fix this in the next PM 4.6 build, but some software you are using is not properly writing the NEF file.  Maybe this was a bug in View NX 1.0 (Nikon is up to version 1.2.2 on Windows).

--dennis




Thanks for the thorough research and reply.  As I did not have the problem with the previous version of Pm thought I would report it.