[Originally posted by justin on 2008-07-08 11:32:21-07]I have been performing some tests on NEF files from my Nikon D50 and D200 cameras. I am trying to set the -EXIF:datetimeoriginal tag. I have noticed that once I have written to the tag, I can then not re-write to it again, I get the error "Error: Bad format (0) for SubIFD entry 0". If I restore the file from it's backup nef_original file I can perform the operation again with the same result. Please find example below:
C:\nefs>exiftool -EXIF:datetimeoriginal c:\nefs\DSC_0504.nef
Date/Time Original : 2008:06:12 11:09:13
C:\nefs>exiftool -EXIF:datetimeoriginal="2004:05:18 19:17:22" c:\nefs\DSC_0504.nef
1 image files updated
C:\nefs>exiftool -EXIF:datetimeoriginal c:\nefs\DSC_0504.nef
Date/Time Original : 2004:05:18 19:17:22
C:\nefs>exiftool -EXIF:datetimeoriginal="2005:12:38 11:57:22" c:\nefs\DSC_0504.nef
Error: Bad format (0) for SubIFD entry 0 - c:\nefs\DSC_0504.nef
0 image files updated
1 files weren't updated due to errors
I'm using Exiftool v7.35 command line. Is it a one shot deal to write to this tag and is there any chance the resultant .nef file contains corruption as it can not be re-written to?
[Originally posted by exiftool on 2008-07-08 12:45:24-07]
Thanks for reporting this! This is a bug that was introduced in
exiftool 7.33. The rewritten NEF images are fine, but exiftool
7.33-7.35 erroneously report an error when reading the
SubIFD. I will fix this and get out a new release ASAP.
- Phil
[Originally posted by exiftool on 2008-07-08 15:07:43-07]
I have released the Perl and OS X versions of ExifTool 7.36,
which fixes this problem. And I will release the Windows
version later today when I get access to my Windows machine.
Thanks again for the bug report.
- Phil
[Originally posted by frereroy on 2008-07-08 16:16:08-07]
Mac OS X Package: ExifTool-7.36.dmg gives a file not found error.
Best wishes.
[Originally posted by exiftool on 2008-07-08 17:31:16-07]
Ooops, thanks. Forgot to upload that file.
Done now.
- Phil
[Originally posted by justin on 2008-07-09 17:23:43-07]Thanks Phil, that's great! I've tested the new build and it appears to work. I say appears because I have now noticed the following behavour:
Notice that when I try to change the IFD0:DateTimeOriginal tag by 8 hours, it also changes the ExifIFD tag by the same amount. This may of course be by design but my goal is to synchronise all my date tags on a large quantity of .NEF files. This is the classic situation where I forgot to change the time on the camera and being a stickler, I would like to manually change all the meta dates to reflect the local time.
D:\Photos\Library\2006\09\03>exiftool -EXIFIFD:allDates -IFD0:alldates *.nef -s
-G1
======== 2006-09-03 D50-San Francisco-156.NEF
[ExifIFD] DateTimeOriginal : 2006:09:03 13:06:56
[ExifIFD] CreateDate : 2006:09:03 13:06:56
[IFD0] DateTimeOriginal : 2006:09:03 21:06:56
[IFD0] ModifyDate : 2006:09:03 13:06:56
D:\Photos\Library\2006\09\03>exiftool -IFD0:DateTimeOriginal-=8 *.nef -s -G1
11 image files updated
D:\Photos\Library\2006\09\03>exiftool -EXIFIFD:allDates -IFD0:alldates *.nef -s
-G1
======== 2006-09-03 D50-San Francisco-156.NEF
[ExifIFD] DateTimeOriginal : 2006:09:03 05:06:56
[ExifIFD] CreateDate : 2006:09:03 13:06:56
[IFD0] DateTimeOriginal : 2006:09:03 13:06:56
[IFD0] ModifyDate : 2006:09:03 13:06:56
In addition to the above I would be grateful for any informed comment on the following:
I noticed some junk data in the xmp area in many of my images, placed by adobe photoshop elements 4. As I intend to move forward with adobe lightroom, I'm considering using exiftool to remove the unwanted xmp data so I can start afresh. It is my understaning that files straight off the camera do not contain xmp data anyway? Any observations/pitfalls would be greatly appreciated.
Many thanks Phil for your patience and congratulations on an excellent application!
Justin
[Originally posted by exiftool on 2008-07-09 17:47:54-07]
Hi Justin,
There is an ambiguity between information in IFD0 and the ExifIFD. The tags
should exist in one or the other, but not both. Occasionally software writes
a tag to the wrong IFD, or writes it to both when it shouldn't. To account
for this, exiftool attempts to maintain consistency between tags in IFD0
and ExifIFD, and both tags will get updated when you write to either.
You are right that to my knowledge no current camera generates XMP,
but it is only a matter of time...
I haven't seen this junk data that you are talking about, so I can't comment
on it.
- Phil
[Originally posted by exiftool on 2008-07-09 17:54:10-07]I just looked at your last post in more detail and noticed
the IFD0/ExifIFD inconsistency. By the specification,
DateTimeOriginal should be written to the ExifIFD, not
IFD0. However, it seems that the IFD0 value is correct.
To fix this, you could move IFD0:DateTimeOriginal to
the properl location:
exiftool "-Exif:DateTimeOriginal<IFD0:DateTimeOriginal" FILE
This will write the proper value to the proper location (ExifIFD in
this case), and remove the value from the improper location (IFD0).
- Phil
[Originally posted by justin on 2008-07-11 11:11:18-07]
Hi Phil, Many thanks for your help. That worked a treat!
I should have explained that the 'junk' I mentioned was partly old keywords I had added with Adobe Photoshop Elements 4 and partly meta that the aforementioned application wrote to the files without my knowledge.
My goal is to tidy up 14000 images to be "as shot" so I can import them clean into Lightroom.I have found keywords writen into Exif, IPTC and XMP and I would prefer to null the IPTC and XMP and ensure the exif data is as I would like prior to Lightroom indexing the images. Does this seem sensible?
[Originally posted by exiftool on 2008-07-11 11:19:49-07]
Sounds reasonable to me if the IPTC and XMP doesn't contain
useful information. You wouldn't want to import a lot of junk
into your lightroom database.