Sunday, January 29, 2012

Is it possible to set the year instead of a complete creation date in a JPEG?

Question

I use iPhoto to manage my pictures. Unfortunately I have many pictures from the 80s. These pictures are actually slides that I have scanned in during 2008. So my problem is that the creation date of all these pictures is set to the date when I scanned it in. Now I want to set the real date of these pictures. Unfortunately I don't know the exact date, but at least the year.

So is there any function available to only set the year field of a date without a specific date?

I asked this question here, because the problem is not Mac-specific, but a general problem.

Answer

The EXIF specification for JPEG metadata says:

The date and time of image creation. In this standard it is the date and time the file was changed. The format is "YYYY:MM:DD HH:MM:SS" with time shown in 24-hour format, and the date and time separated by one blank character [20.H]. When the date and time are unknown, all the character spaces except colons (":") may be filled with blank characters, or else the Interoperability field may be filled with blank characters. The character string length is 20 bytes including NULL for termination. When the field is left blank, it is treated as unknown.

Which allows for entirely unknown dates, but doesn't have a standard for less-precise dates. You could fill unknown portions with spaces, but I'm not sure which software will let you do that, and more importantly, which software will react badly to reading that, since the standard does not explicitly give that as an option.

I think you have two basic choices:

  • Option 1: Guess. Based on the subject matter, put in your best guesses for the date and time.
  • Option 2: Chose a clearly-arbitrary value like midnight on January 1st of the appropriate year — YYYY:01:01 00:00:00. When someone looks later, they probably won't think that the pictures were all from some wild New Year party.

The latter can be combined into the former. When I know the day but not the time, I usually set the time to noon: 12:00:00, because this avoids (a large degree of) time-zone ambiguity. (Another unfortunate lack in the EXIF standard.)

No comments:

Post a Comment