imageGetWidth

Retrieves the width of the specified ColdFusion image.

imageGetWidth(name) → returns Numeric

Member Function Syntax

someImage.getWidth()

imageGetWidth Argument Reference

name
Required

The image on which this operation is performed.

Examples sample code invoking the imageGetWidth function


Using getWidth member function

CF 11+ Lucee 4.5+ Extract the width of an image

imgObj = imageRead("http://cfdocs.org/apple-touch-icon.png");
width = imgObj.getWidth();
writeOutput(width);

Fork me on GitHub