ImageGetIPTCMetadata

Description

Retrieves the International Press Telecommunications Council (IPTC )headers in a ColdFusion image as a structure. The IPTC metadata contains text that describes the image that is stored with it. IPTC metadata includes, but is not limited to, caption, keywords, credit, copyright, object name, created date, byline, headline, and source.

Returns

A structure containing IPTC header values.

Function syntax

ImageGetIPTCMetadata(name)

History

ColdFusion 8: Added this function.

Parameters

Parameter

Description

name

Required. The ColdFusion image on which this operation is performed.

Usage

The IPTC metadata contains text that describes the image that is stored with it. IPTC metadata includes, but is not limited to, caption, keywords, credit, copyright, object name, created date, byline, headline, and source.

The result of the ImageGetIPTCMetadata function is cached in the ColdFusion image to optimize performance.

The ImageGetIPTCMetada function applies only to JPEG images. If you try to retrieve metadata for Base64, BLOB, or other types of images, ColdFusion generates errors.

Example

<!--- This example shows how to retrieve the IPTC header information for a 
JPEG file. ---> 
<!--- Create a ColdFusion image from a JPEG file. ---> 
<cfimage source="images\aiden01.jpg" name="myImage"> 
<!--- Retrieve the IPTC header information saved with the image, such as 
copyright, caption, and headline. ---> 
<cfset data = ImageGetIPTCMetadata(myImage)> 
<!--- Display the parameter values for the ColdFusion image. ---> 
<cfdump var="#myImage#"> 
<!--- Display the IPTC header information. ---> 
<cfdump var=#data#>