Getting EXIF Metadata with ColdFusion 8
One example that I've been meaning to post is how to get Image Metadata using the Exchangeable Image File Format or EXIF a using ColdFusion 8. It's actually quite simple, to get a list of all the EXIF tags simply use the ImageGetExifMetaData function.
Here's a quick example:
<cfimage action="read" source="#ExpandPath("lobster.jpg")#" name="img">
<cfset exif = ImageGetEXIFMetaData(img)>
<cfdump var="#exif#">
Here's a screen shot of a CFDUMP of the EXIF Image Metadata.
As you can see some of the useful keys are Model which gives you the digital camera model (Canon EOS DIGITAL REBEL XTi in this example), Make gives you the digital camera brand (Canon), Exposure Time gives you the exposure time (1/60 sec).
Tweet
add to del.icio.us
| Tags: coldfusion 8, cfimage, exif, imagegetexifmetadata, cfml, examples
Related Entries
- CFImage Presentation Outline - September 14, 2007
- ColdFusion 8 Update 1 Fixes some Image Processing Quirks - April 5, 2008
- 10 Most Useful Image Functions in ColdFusion 8 - April 5, 2008
- CFImage Effects Library for ColdFusion 8 - August 9, 2007
- Implicit Structure Notation ColdFusion - January 13, 2009
Trackbacks
Comments
http://en.wikipedia.org/wiki/Color_space
Second you might also want to install the hotfix for CF 8.1 as it includes some image manipulation bugs.
If the file does have valid EXIF data, and CF 8.1 can't read it, you should submit a bug to Adobe.
How can I get the Date/Time out of exif? There is no problem e.g. getting the model info like this: <cfoutput> #exif.model# </cfoutput> But where can I get the "name" for all the Date/Time functions?
Post a Comment
Recent Entries
- Nginx redirect www to non www domain
- HashDOS and ColdFusion
- HackMyCF Updated for APSB11-29 Security Hotfix
- Adobe eSeminar on FuseGuard
- Determining Which Cumulative Hotfixes are Installed on ColdFusion
- Adding Two Factor Authentication to ColdFusion Administrator
- ColdFusion Developer Week at Adobe.com
- Bug Loading Scripts for CFFileUpload and CFMediaPlayer





