If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to Include EXIF File Date and Time?

I am using the 64bit version of Thumbnailer 10.1.0.4 on Windows 7, Service Pack 1.

I would like to output source HTML pages that include the I've clicked the "More Options" button from the main Thumbnailer screen, then go to HTML Output > Source Pages >Source Pages Text

From there I go to the bottom box labeled "...source image tags go here" I have some standard text entered in that area, but also would like to include EXIF data, such as the date and time from the "DateTimeOriginal" field. I'd like the data to appear such as 1/8/2011 - 1:52:12 PM.

I've tried adding the variable this way: &Exif.Image.DateTime but had no luck.

Can someone point me in the right direction? Thanks in advance for any ideas on this.

Re: How to Include EXIF File Date and Time?

To get the EXIF DateTime tag, use the Exif operator. The ID of the DateTime field is "306" (these IDs are listed int he ThumbNailer help file). So, the TN expression to get the date/time out of the source file, on the source page is:

Code:

&Exif(srcFile, 306)

And that will print something like "2000:12:11 18:49:48"

The EXIF DateTime is stored in this format: YYYY:MM:DD HH:MM:SS

Getting that into the format you want will take a little work. This should do it:

You can just copy that to your source page template, anywhere you want to output the EXIF time.

In case you want to know, here's how that works...
First line copies the EXIF date/time to a temporary variable.
Second line extracts the year digits from that temporary variable.
Third line extracts the Month. Fourth line extracts the Day. Fifth line extracts the hour.
Sixth line looks at the hour and subtracts 12, if the hour is greater than 12. Stores that in another temporary variable.

The last line outputs the year parts, in the standard US order. Then it outputs the converted hour, then the minutes and seconds, then looks at the original hour to choose between AM or PM.

Re: How to Include EXIF File Date and Time?

One other question that may help me help myself with EXIF data

How did you determine that EXIFDT, 2, 11 would return the hours in the EXIF data? And if EXIFDT, 2, 11 returns hours, and EXIFDT, 5, 14 returns seconds (from what I surmise from your code), where did the minutes value come from?

Sorry to return with more questions. I did an internet search for EXIFDT values, but did not find any reference that spoke to values such as "EXIFDT, 2, 11"

Re: How to Include EXIF File Date and Time?

I have a series of photos taken at 12 p.m., for example, in the EXIF data, the "Original Picture Taken" and the "Digitized" value for one of the images is 12:24:56 P.M. From the explanation of how this works, the script looks to the original EXIF time and determines whether it should be AM or PM. I've found that the script is identifying the photo as AM instead of PM.