On 8 May 2014, at 10:59 pm, email@hidden wrote:
trying to extract 20+ Exif-fields from a picture I'm not sure from your post whether you want only the EXIF values, or the other stuff as well. If only the EXIF values, and you're running Mavericks, you can get it directly as an AppleScript record via a script library, without having to bother with EXIFTools.
Save this as a Cocoa AppleScript library:
use framework "Foundation" use framework "AppKit" -- for image stuff
on readEXIFFromJpeg:POSIXPath set theImageRep to current application's NSBitmapImageRep's imageRepWithContentsOfFile:POSIXPath set theEXIFData to theImageRep's valueForProperty:(current application's NSImageEXIFData) return theEXIFData as record end readEXIFFromJpeg:
Then call it like this:
set POSIXPath to "/Users/shane/Desktop/IMG_0436.jpg" tell script "<name of script>" set theRecord to its readEXIFFromJpeg:POSIXPath end tell --> {DateTimeOriginal:"2014:04:24 13:48:02", ComponentsConfiguration:{1, 2, 3, 0}, FocalLenIn35mmFilm:33, BrightnessValue:4.377906799316, LensMake:"Apple", FNumber:2.400000095367, FocalLength:4.119999885559, ShutterSpeedValue:5.321985721588, SubjectArea:{1631, 1223, 1795, 1077}, ApertureValue:2.526068925858, SceneType:1, SceneCaptureType:0, ColorSpace:1, LensSpecification:{4.119999885559, 4.119999885559, 2.400000095367, 2.400000095367}, PixelYDimension:3264, WhiteBalance:0, FlashPixVersion:{1, 0}, DateTimeDigitized:"2014:04:24 13:48:02", ISOSpeedRatings:{64}, ExposureMode:0, ExifVersion:{2, 2, 1}, PixelXDimension:2448, LensModel:"iPhone 5 back camera 4.12mm f/2.4", ExposureProgram:2, ExposureTime:0.025000000373, SubsecTimeDigitized:"926", Flash:16, SubsecTimeOriginal:"926", SensingMethod:2, MeteringMode:5}
|