Author Topic: Capture Date  (Read 9374 times)

Offline wazrob

  • Newcomer
  • *
  • Posts: 40
    • View Profile
Capture Date
« on: November 22, 2014, 09:35:35 PM »
I have photos that, after modifying with a photo editing program, have the following metadata:

Photo ingested without IPTC Stationary Pad Applied:
---- IFD0 ----
Modify Date                     : 2014:11:23 09:17:09      Modified by photo editing program
---- ExifIFD ----
Date/Time Original           : 2014:11:17 19:57:20
Create Date                     : 2014:11:17 19:57:20
---- IFD1 ----
Modify Date                      : 2014:11:23 09:17:09      Modified by photo editing program

Photo ingested with IPTC Stationary Pad Applied:
---- IFD0 ----
Modify Date                     : 2014:11:23 13:06:37      Modified by photo editing program
---- ExifIFD ----
Date/Time Original           : 2014:11:18 19:40:23
Create Date                     : 2014:11:18 19:40:23
---- IFD1 ----
Modify Date                      : 2014:11:23 13:06:37      Modified by photo editing program
---- IPTC ----
Time Created                    : 19:40:23+11:00
Date Created                    : 2014:11:18
---- XMP-exif ----
Date/Time Original            : 2014:11:18 19:40:23+11:00
---- XMP-photoshop ----
Date Created                    : 2014:11:18 19:40:23+11:00
---- XMP-xmp ----
Create Date                      : 2014:11:18 19:40:23+11:00
Metadata Date                  : 2014:11:18 19:40:23+11:00
Modify Date                       : 2014:11:18 19:40:23+11:00

When I sort or display these photos using Capture Time or the variable date, it displays and sorts using the Modify Date not Capture Date.

The variable
Time: date, shot - Has the following description "Capture date of photo according to camera or file creation time".

Unfortunately on my system, Windows 7 64bit, PM version 5.0 build 15800 (e6ecc1c), it is using the Modify Date not the Capture Date.

Can PM be changed to use the Capture Date (Date/Time Original or Create Date) instead of the Modify Date?


Thanks,

Warren

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Capture Date
« Reply #1 on: November 22, 2014, 11:43:07 PM »
Only when the file really doesn't have a creation date (usually datetimeoriginal in the exif), will pm have to fall back to the modified date. In all other cases pm does use the creation date. You should be able to tell what date pm uses by adding e.g., {date} {time} to your info text and or label in the contact sheet. These should be on the 17th and 18th respectively for your files.

If they're showing another date, please upload one of the sample files so we can have a look.

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

Offline wazrob

  • Newcomer
  • *
  • Posts: 40
    • View Profile
Re: Capture Date
« Reply #2 on: November 23, 2014, 01:06:19 AM »
Hayo,

As you can see in my data what you call "datetimeoriginal in the exif" is correct in the ExifIFD, what is changed is in the exif IFD0 and IFD1, which do not have the Date/Time Original.

If you start with an .NEF file, it has an ExifIFD and IFD0 Date/Time Original.  If in PM you save this as a .JPG file, PM removes the IFD0 Date/Time Original, the only Date/Time Original is in the ExifIFD, therefore PM should be using the ExifIFD date instead of the IFD0 date, which only contains a Modification Date.

Warren

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Capture Date
« Reply #3 on: November 23, 2014, 03:01:29 AM »
Warren,

I don't see what the problem is here? The metadata of both files looks fine to me.

What you are referring to are indeed modification dates (of the metadata or the image itself), these can change whenever the image is touched by software. So what you are seeing is correct. The fact that there are no datetime originals in the IFDs is no issue at all. PM will still be able to find the datetime original in exififd (or even e.g., createdate in xmp).

Only when you strip all metadata from a file will PM not be able to tell the creation date (as it won't be present), in that case it may even have to fall back to the modification date of the file as the file system reports it. But that's not the case with the files you are describing, so PM should definitely sort these correctly!

If you find this is not the case, there may of course be a bug in PM. In that case please upload two (small) images that exhibit this behaviour so we can determine what's going on.
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline wazrob

  • Newcomer
  • *
  • Posts: 40
    • View Profile
Re: Capture Date
« Reply #4 on: November 24, 2014, 12:08:41 AM »
Hayo,

"I don't see what the problem is here? The metadata of both files looks fine to me."  The metadata IS correct.  PM is not displaying the data correctly.

I understand how the modification date is changed if the file is updated by software.  What I am saying is that although there is a Date/Time Original in the ExifIFD, PM is using the Modify Date from the IFD0 or IFD1.

Checkout this modified photo, you will see that the ExifIFD Date/Time Original is : 2014:11:20 09:28:21 and the IFD0 Modify Date is : 2014:11:24 16:15:23.  This is shown in PM sorted by Capture Time, displaying variables {date} {time} as 24/11/2014 4:15:23 PM. 

The IPTC Info panel drop down for Time and Date shows the following:
Date 9:28:21 AM 20/11/2014
Capture Time 4:15:23 PM 24/11/2014
Modification Date 4:16:15 PM 24/11/2014.  This appears to be the File Modification Date/Time

It appears that PM is getting confused with dates.

Warren

[attachment deleted by admin]

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Capture Date
« Reply #5 on: November 24, 2014, 01:30:35 AM »
Hi Warren,

thank you for the sample, now I can reproduce your issue! Somehow, instead of taking the datetime original as the creation date, PM reverts to the modify date instead. This may have to do with the structure of your file because when I change the ModifyDate tag in one of my jpgs, PM still shows the correct creation date!

It looks as if PM gets confused by your image because of the two IFDs, PM then takes the data from the second IFD1 entry, which you can verify by having exiftool change only that entry. This also showed me there  was a problem with your file to begin with “Warning: [minor] Entries in ExifIFD were out of sequence.”, indicating that the software that created your JPG did not conform to the standards!

So the question becomes: what software did you use to create that jpg file?

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

Offline wazrob

  • Newcomer
  • *
  • Posts: 40
    • View Profile
Re: Capture Date
« Reply #6 on: November 24, 2014, 04:01:21 AM »
Hayo,

Sony outputs it's photos with IFD0 and IFD1 each containing only the modify date, datetime original is only in the ExifIFD.  So multiple IFDs should not be a problem, but having a IFD1 with no datetime original probably is.

If I ingest a photo into PM then change the IFD1 modify date with ExifTool.  PM will give me all the date errors detailed above.  As after ingesting the photo, modifying date with ExifTool is the only program to touch the photo there should be no problem with the metadata. 

My thought is that if there is only a IFD0, PM retrieves the date from the datetime original in the ExifIFD, if there is a IFD1, PM is expecting a datetime original in the IFD1, if the IFD1 does not contains a datetime original, the modify date is used.

I think that PM should use the datetime original in the ExifIFD in all cases.

Sony outputs IFD0 and IFD1 with only the modify date in both IFDs.  So if you use any program that changes the modify date, that is the date PM will use for capture date.

Warren

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Capture Date
« Reply #7 on: November 24, 2014, 05:14:44 AM »
Hi Warren,

I'm not sure what else will break if PM is changed to always prefer the datetime original from the exififd, but it does look like this would solve your problem.

However, the file you uploaded still contains (minor) metadata errors so the software that generated it (I don't think it came out of the camera exactly as you uploaded it?), is likely the cause of the trouble to begin with. Can you upload a file directly from your camera (and untouched by any software) too?

Hayo,

Sony outputs it's photos with IFD0 and IFD1 each containing only the modify date, datetime original is only in the ExifIFD.  So multiple IFDs should not be a problem, but having a IFD1 with no datetime original probably is.

If I ingest a photo into PM then change the IFD1 modify date with ExifTool.  PM will give me all the date errors detailed above.  As after ingesting the photo, modifying date with ExifTool is the only program to touch the photo there should be no problem with the metadata. 

My thought is that if there is only a IFD0, PM retrieves the date from the datetime original in the ExifIFD, if there is a IFD1, PM is expecting a datetime original in the IFD1, if the IFD1 does not contains a datetime original, the modify date is used.

I think that PM should use the datetime original in the ExifIFD in all cases.

Sony outputs IFD0 and IFD1 with only the modify date in both IFDs.  So if you use any program that changes the modify date, that is the date PM will use for capture date.

Warren
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline dennis

  • President
  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 462
    • View Profile
    • Camera Bits, Inc.
Re: Capture Date
« Reply #8 on: November 24, 2014, 11:24:02 AM »
Warren,

I put in a fix for PM.  The sample file you provided has the TIFF date/time tag written in the thumbnail IFD which is bizarre to put it there.  This was being "discovered" during parsing after PM loaded the Exif capture date/time and was overwriting the correct value.  So now I ignore these extra date/time tags in the thumbnails of non-raw files and this fixed your problem.

Regards,

--dennis

Offline wazrob

  • Newcomer
  • *
  • Posts: 40
    • View Profile
Re: Capture Date
« Reply #9 on: November 25, 2014, 01:03:03 AM »
Hayo,

This is a jpg photo from my Nikon camera, smallest that I can create.  Copied in Windows from the SD card to the PC.

To see my problem just run this ExifTool command against the photo.
Exiftool -OverWrite_Original -IFD1:ModifyDate="2014:12:25 10:00:00"

After the ExifTool change you will see in PM the problem with the dates.

Try the ExifTool change and see the results in PM. 

This photo should not have the problem that Dennis mentioned.

Warren

[attachment deleted by admin]

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Capture Date
« Reply #10 on: November 25, 2014, 11:33:19 AM »
This is a jpg photo from my Nikon camera, smallest that I can create.  Copied in Windows from the SD card to the PC.

To see my problem just run this ExifTool command against the photo.
Exiftool -OverWrite_Original -IFD1:ModifyDate="2014:12:25 10:00:00"
Right, that at least confirms what I was thinking already: the software you used caused the problem in the file, it created an additional IFD1 block, which should basically not really be in the file. How did you create your other file? Or did you also use exiftool on it (if so, you should correct your code to not use IFD1)?

Anyway Dennis has now altered the code and he will ignore the (erroneous) IFD1 block so your issue will be fixed in a next version.

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

Offline wazrob

  • Newcomer
  • *
  • Posts: 40
    • View Profile
Re: Capture Date
« Reply #11 on: November 25, 2014, 11:46:16 PM »
Sorry Hayo but No that is not the problem.  Both Sony and Nikon create an IFD1 in their camera JPGs, neither containing a DateTime Original.

As the last photo I sent demonstrates, a photo directly from the camera is OK in PM, but change only the IFD1 Modify Date and you have a problem in PM.

The problem is if the photo contains an IFD1 without a datetime original (which is the default for both Sony and Nikon JPGs), PM will use the IFD1 modify date.  This is OK until you make any modification to the photo, that changes the IFD1 modify datetime.

The metadata problems with the first photo I sent are not the problem that I am having with dates as the second photo straight from the camera demonstrates.  Unless the data Sony and Nikon are generating is invalid.

Warren

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Capture Date
« Reply #12 on: November 27, 2014, 01:26:24 AM »
Sorry Hayo but No that is not the problem.  Both Sony and Nikon create an IFD1 in their camera JPGs, neither containing a DateTime Original.
Hi Warren,

Sure, they do contain an IFD1 block, but that block does not originally contain a modify date! Furthermore, editing the files with e.g., Photoshop or the Mac Preview applications does not add the field there either. So the software you are using is doing something odd which triggered this behaviour with PM (and is also why no one has noticed this before)! Anyway, that is going to be solved now so you won't notice it any longer either :)

Still interested to know what software you used on your images  that made this happen ;)

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