How to create table from image metadata?

Discussion in 'Digital Photography' started by 124151155, Aug 21, 2010.

  1. 124151155 macrumors regular

    124151155

    Joined:
    Jan 9, 2008
    #1
    Hi,
    I need to make a table which is a list of filenames, aperture value, exposure time and ISO of about 150 photos. I was wondering if there is some software, or a method available that can grab this from a bulk lot of files and export it all as a table in any format? I have Lightroom, Photoshop and Bridge and I cannot find this functionality anywhere. Copying it all out is incredibly tedious =(

    Any help is greatly appreciated.

    Tim
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Is there an AppleScript interface into Bridge? I'm not a Bridge user. I know there is one into Aperture as I used it to create a specialised metadata extractor once upon a time.
     
  3. 124151155 thread starter macrumors regular

    124151155

    Joined:
    Jan 9, 2008
    #3
    I don't believe so, but I don't know enough scripting myself anyway =/
     
  4. telecomm macrumors 65816

    telecomm

    Joined:
    Nov 30, 2003
    Location:
    Rome
    #4
    A quick search turned up this Lightroom plugin. Who knows whether it'll do what you're looking for, but my guess would be that you should focus your attention on searching for Lightroom plugins.
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    Right, here we go. This AppleScript will open each jpg in the folder chosen using Adobe Photoshop CS3 and extract the EXIF properties you desire. It will then write a file called "exifdata.csv" into that folder.

    Note if your Photoshop is not called exactly Adobe Photoshop CS3 (say you have a later version) they you'll need to change that value!

    Code:
    set theFolder to choose folder
    
    tell application "Finder"
    	set fileList to every file of theFolder
    end tell
    
    tell application "Adobe Photoshop CS3"
    	set the theoutput to "FileName,ISO,Aperture,Exposure
    "
    	activate
    	repeat with fileItem in fileList
    		if the name extension of fileItem is equal to "jpg" then
    			set filename to name of fileItem
    			set filename to (theFolder as string) & filename
    			open file filename in theFolder
    			set exifInfo to EXIF of info of first document
    			set theISO to "?"
    			set apertureValue to "?"
    			set exposureTime to "?"
    			repeat with exifItem in exifInfo
    				set tag to first item of exifItem
    				set value to second item of exifItem
    				if tag is equal to "ISO Speed Ratings" then
    					set theISO to value
    				end if
    				if tag is equal to "Aperture Value" then
    					set apertureValue to value
    				end if
    				if tag is equal to "Exposure Time" then
    					set exposureTime to value
    				end if
    			end repeat
    			close the first document
    			set theoutput to theoutput & filename & "," & theISO & "," & apertureValue & "," & exposureTime & "
    "
    		end if
    	end repeat
    	
    	set theFileReference to open for access (theFolder as string) & "exifdata.csv" with write permission
    	write theoutput to theFileReference
    	close access theFileReference
    end tell
    
    How do you use this? Open AppleScript Editor, copy and paste the above exactly into a new document and run it. You can save it as an application using AppleScript Editor. Hope this works for you...
     
  6. 124151155 thread starter macrumors regular

    124151155

    Joined:
    Jan 9, 2008
    #6
    robbieduncan, words simply cannot express your awesomeness, thank you very much for this, it's exactly what I needed!

    and telecom, thanks for the link, the plugin looks great and does what I need, I'll probably donate and get it if I find I need to do this again.

    Tim
     
  7. hyphen15 macrumors newbie

    Joined:
    Jul 15, 2006
    #7
    Hey guys,

    I was wanting to do something similar...

    I have images with several keywords. I want to be able to create a csv file or similar so that I can use it in a search facility on a MySQL database website.

    I've tried to edit the script given to output the filename and keywords only but I've failed on each attempt. Is it possible to do?

    Thanks,

    Chris
     

Share This Page