Hi there fellow AppleScripters,
I am trying to get the actual date/time digitised from a JPEG. I have tried three methods but they all give me the same incorrect answer, that being the file creation date/time. In some cases the file creation date is not the same as the date the photograph was taken.
Method 1: ask the Finder for the creation date
Method 2: ask Image Events to get the “creation” value.
Method 3: use the shell script “mdls” command to list all the metadata for the file
The interesting thing is that each method gives me the same date/time with different approaches to GMT.
Method 1: (finder creation date) gives me the file creation date/time adjusting for GMT in my region
Method 2: (Image Events) gives me the file creation date/time adjusting for GMT in the region that the image was saved.
Method 3: (Shell script ‘mdls’) gives me the file creation date/time without compensating for GMT
But that is just an interesting side note. The real puzzle is that if I open the JPEG in Preview and select Tools/Inspector and then click on the ‘EXIF’ tab, I am given the “Date Time Digitized” value which is the actual date/time the photo was taken and the same as the date stamp on the image itself. This is different from the file creation date/time.
My question is, does anyone know where the “date time digitized” information is stored in the JPEG and how it can be accessed using AppleScript and/or shell script?
Best regards,
David