Returns a structure that contains information about the image, such as height, width, color model, size, and filename.
A structure that contains information for image parameters.
ImageInfo(name
)
cfimage, ImageGetHeight, ImageGetWidth, IsImage, IsImageFile
ColdFusion 8: Added this function.
Parameter |
Description |
---|---|
name |
Required. The ColdFusion image on which this operation is performed. |
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.
<!--- 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>