Enforcing size restrictions
ColdFusion provides several functions for retrieving information associated with images, including the height and width of an image. For example, you can use the ImageGetWidth and ImageGetHeight functions to determine whether an image is too large to upload to a website or database.
The following example shows how to prevent users from uploading images that are greater than 300 pixels wide or 300 pixels high:
<cfimage action="read" source="#fileUpload.serverFile#" name="myImage">
For information about retrieving image metadata, see the ImageGetEXIFTag, ImageGetIPTCTag, and ImageInfo functions in the CFML Reference.