Description

Retrieves the Exchangeable Image File Format (EXIF) headers in an image as a CFML structure.

Returns

A structure with the EXIF header values.

Category

Image functions

Function syntax

ImageGetEXIFMetadata(name)

See also

cfimageImageGetEXIFTagImageGetBlobImageGetBufferedImageImageGetHeightImageGetIPTCTagImageGetWidthImageInfoIsImageIsImageFile

History

ColdFusion 8: Added this function.

Parameters

Parameter

Description

name

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

Usage

EXIF is a standard for storing interchange information in image files, especially those using JPEG compression. Most digital cameras use the EXIF format. EXIF metadata includes information pertaining to the creation of the image, such as the creation date, the software used to create the image, the aperture, the make and model, and the exposure of the image.

The result of the ImageGetEXIFMetadata function is cached in the ColdFusion image to optimize performance. The ImageGetEXIFMetadata function applies only to JPEG images. If you try to retrieve metadata for Base64, BLOB, or other types of images, ColdFusion generates errors.

List of Metadata information returned by the function

These are the possible metadata values that are returned for an image because not all of the values are relevant for every image.

  1. AF Area Mode
  2. AF Assist Lamp
  3. Artist
  4. Audio
  5. Burst Mode
  6. Camera Uptime
  7. Color Effect
  8. Color Mode
  9. Color Space
  10. Components Configuration
  11. Compressed Bits Per Pixel
  12. Contrast
  13. Contrast Mode
  14. Custom Rendered
  15. Date/Time
  16. Date/Time Digitized
  17. Date/Time Original
  18. Digital Zoom Ratio
  19. Easy Mode
  20. Exif Image Height
  21. Exif Image Width
  22. Exif Version
  23. Exposure Bias Value
  24. Exposure Mode
  25. Exposure Program
  26. Exposure Time
  27. F-Number
  28. File Source
  29. Flash
  30. Flash Bias
  31. FlashPix Version
  32. Focal Length
  33. Focal Length 35
  34. Focus Mode
  35. Gain Control
  36. ISO Speed Ratings
  37. Image Description
  38. Image Stabilization
  39. Internal Serial Number
  40. Macro Mode
  41. Make
  42. Max Aperture Value
  43. Metering Mode
  44. Model
  45. Noise Reduction
  46. Orientation
  47. Print IM
  48. Quality Mode
  49. Record Mode
  50. Resolution Unit
  51. Rotation
  52. Saturation
  53. Scene Capture Type
  54. Scene Type
  55. Self Timer
  56. Sensing Method
  57. Sequence Number
  58. Sharpness
  59. Software
  60. Thumbnail Compression
  61. Thumbnail Length
  62. Thumbnail Offset
  63. Version
  64. White Balance
  65. White Balance Bias
  66. White Balance Mode
  67. X Resolution
  68. Y Resolution
  69. YCbCr Positioning

If there are unknown values, the values will show up as the following:

  1. Unknown Data Dump
  2. Unknown tag (0x0027)
  3. Unknown tag (0x002f)

Example

<!--- This example shows how to retrieve the EXIF header information from a 
JPEG file. ---> 
<!--- Create a ColdFusion image from an existing JPEG file. ---> 
<cfimage source="images\paul05.jpg" name="myImage"> 
<!--- Retrieve the metadata associated with the image. ---> 
<cfset data =ImageGetEXIFMetadata(myImage)> 
<!--- Display the ColdFusion image parameters. ---> 
<cfdump var="#myImage#"> 
<!--- Display the EXIF header information associated with the image 
(creation date, software, and so on). ---> 
<cfdump var="#data#">

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy