![]() I just tried your Xcode project SwissalpS, and unfortunately it didn’t get the dates right either. I settled with the “command line PHP” way of doing EXIF work. If you look at my script code “tell application “GraphicConverter” to set thisExif to get file exif of thisFile” you’ll see that graphic converter can read the exif data without actually opening the file. Much faster than any other technique I tried including command line helpers. In fact using graphic converter is lightning fast. I cringe at the idea of opening and closing thousands of images in an app like Graphic Converter just to extract some EXIF data. Using command line helpers is certainly the fastest way to go. As such I proposed a couple different options. My biggest point was that if you use the date from image events then you won’t be getting the true date a picture was taken, so if you want the true date derived from the “date setting on your camera” then you can’t use image events to get it. It’s some other date found in the exif data. Therefore the image events date is not the “date setting on your camera”. But if you look at the results from my example above you’ll see that the creation date derived from image events is not the same date as the “Date and time of original data generation” derived from the exif data. I looked into it more and you’re right that the finder creation date and the creation date from image events aren’t the same. You’re right and you’re wrong here SwissalpS. This time’s accuracy depends on the date setting in your camera. Whereas the EXIF date(s) reflect the actualI time your image was taken. The finders creation date reflects the moment when the image was copied to the hard drive. Unless you took the picture with your mac, the dates aren’t the same. Set comment of file the_file to the_date & return & current_comment Set current_comment to comment of file the_file Set the_date to exifDate of this_exifData Set the_file to filePath of this_exifData Repeat with i from 1 to (count of exifData) write the exif date to the comments field of the files Tell image 1 to set this_exifDate to (value of 1st metadata tag whose name is "creation") Set thisFile to item i of theFiles as string Repeat with i from 1 to count of theFiles Tell application "Finder" to set theFiles to files of folder macFolder As proof here’s what I got using the “creation date” from “Image Events” versus an exif date from “Graphic Converter” set macFolder to choose folder But these exif dates are different than the creation date gotten from the “Finder” or “Image Events”. In my pictures all 3 of the exif dates are the same though. There’s actually 3 different dates in the exif data. The date in the exif data is different from the “creation” date in the finder. Isn’t the “creation” date that is gotten from image events the same as sorting files in the finder by “creation date”? I think it’s the same date, and if this is the case then using image events won’t help Joe (aka nottoohairy) because he said he had problems sorting by the creation date in the Finder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |