Whatever message this page gives is out now! Go check it out!

ImageInfo

Last update:
May 18, 2026

Description

Returns a structure that contains information about the image, such as height, width, color model, size, and filename.

Returns

A structure that contains information for image parameters.

Category

Function syntax

ImageInfo(image)

See also

History

ColdFusion (2018 release): Renamed the parameter name to image.
ColdFusion 8: Added this function.

Parameters

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

Usage

Use this function to determine whether images are compatible. For example, to use the ImageOverlay function to overlay two images, both images must have the same color model.

Example

<!--- This example shows how to retrieve information associated with the image. ---> 
 <!--- Create a ColdFusion image from a JPEG file.---> 
 <cfimage source="../cfdocs/images/artgallery/jeff05.jpg" name="myImage"> 
 <!--- Retrieve the information associated with the image. ---> 
 <cfset info=ImageInfo(myImage)> 
 <cfdump var="#info#"></cfdump> 
 <p>height = <cfoutput>#info.height#</cfoutput> 
 <p>width = <cfoutput>#info.width#</cfoutput> 
 <p>source = <cfoutput>#info.source#"</cfoutput> 
 <p>pixel size = <cfoutput>#info.colormodel.pixel_size#</cfoutput> 
 <p>transparency = <cfoutput>#info.colormodel.transparency#</cfoutput>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page