Returns a structure that contains information about the image, such as height, width, color model, size, and filename.
imageInfo(name)
returns struct
someImage.info()
Name | Type | Required | Default | Description |
---|---|---|---|---|
name | string | Yes | The image on which this operation is performed. |
Uses the imageRead function to read an image from a url.
<cfset img = imageRead("http://lorempixel.com/10/20/")>
<cfset imgInfo = imageInfo(img)>
<cfoutput>Image is #imgInfo.height#px high and #imgInfo.width#px wide.</cfoutput>
CF11+ Lucee4.5+ Extract the image info
imgObj = imageRead("https://cfdocs.org/apple-touch-icon.png");
info = imgObj.info();
writeDump(info);