Hi All,
I have a script that will extract EXIF info from an image.
set myFile to (choose file)
tell application "GraphicConverter"
try
get file exif myFile
set ImgExif to result
on error number -2
-- This is the same string as is returned by 'get exiftext' when there's no such data.
"the file contains no exif data"
end try
end tell
return ImgExif
The script returns the info below.
{"$0000,$00FE,Unknown tag (254),0", "$0000,$0100,Image width,600", "$0000,$0101,Image height,480", "$0000,$0102,Number of bits per component,{8,8,8}", "$0000,$0103,Compression scheme,reserved", "$0000,$0106,Pixel composition,RGB", "$0000,$010F,Make,Phase One", "$0000,$0110,Model,H 20", "$0000,$0111,Image data location,{19940,20330,20732,21158,21584,21982,22372,22724,23082,23690,...}", "$0000,$0115,Number of components,3", "$0000,$0116,Number of rows per strip,4", "$0000,$0117,Bytes per compressed strip,{389,402,426,426,397,390,351,357,607,725,...}", "$0000,$011A,X resolution,72.0 ppi (pixel per inch)", "$0000,$011B,Y resolution,72.0 ppi (pixel per inch)", "$0000,$011C,Image data arrangement,1", "$0000,$0128,Resolution unit,inch", "$0000,$0131,Software,Adobe Photoshop 7.0", "$0000,$0132,File date and time,2005:08:21 10:09:59", "$0000,$013D,Unknown tag (317),2", "$0000,$02BC,Unknown tag (700),", "$0000,$8649,Unknown tag (34377),", "$0000,$8769,-- Exif IFD --,", "$8769,$8827,ISO speed rating,100", "$8769,$9000,Exif version,0210", "$8769,$9003,Date and time of original data generation,2005:08:04 16:58:35", "$8769,$9004,Date and time of digital data generation,2005:08:04 16:58:35", "$8769,$9101,Meaning of each component,RGB", "$8769,$A000,Supported Flashpix version,0100", "$8769,$A001,Color Space,Uncalibrated", "$8769,$A002,Valid image width in pixel,600", "$8769,$A003,Valid image height in pixel,480", "$0000,$8773,Unknown tag (34675),"}
How can I extract each section of the EXIF info into a variable? For instance the second item in the list “$0000,$0100,Image width,600” I would like to set variable imgWidth to 600 and so on for each item in the list or maybe just a handfull of the ones I really need.
Any Thoughts?
Thanks,
MT