imageGetEXIFTag

Retrieves the specified EXIF tag in an image.

imageGetEXIFTag(name, tagName) → returns string

Member Function Syntax

someImage.getEXIFTag(tagName)

Argument Reference

name string
Required

The image on which this operation is performed.

tagName string
Required

The EXIF tag name to be returned.

Examples
Sample code invoking the imageGetEXIFTag function

This example shows how to retrieve one element from the EXIF information associated with an image.

<!--- Create a ColdFusion image from an existing JPEG file. ---> 
 <cfimage source="../cfdocs/images/artgallery/paul05.jpg" name="myImage"> 
 <!--- Retrieve the name of the software application used to create the original image. ---> 
 <cfset data = imageGetEXIFTag(myImage,"software")> 
 <!--- Display the name of the software. ---> 
 <cfdump var="#data#"> 

CF 11+ Lucee 4.5+ Extract model of camera used for image on exiv sample page (http://www.exiv2.org/sample.html)

imgObj = imageRead("http://www.exiv2.org/include/img_1771.jpg");
model = imgObj.getEXIFTag('Model');
writeOutput(model);

Expected Result: Canon PowerShot S40

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub