imageGetWidth
Description
Retrieves the width of the specified ColdFusion image.
Categories
Related
cfimage imageGetBlob imageGetBufferedImage imageGetEXIFTag imageGetHeight imageGetIPTCTag imageInfo isImage isImageFile
History
ColdFusion
8: Added this function.
Syntax
ImageGetWidth(name)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| name | Required. The ColdFusion image on which this operation is performed. |
Returns
An integer
that represents the width of the ColdFusion image in pixels.
Example
<!--- This example shows how to retrieve the width of an image. ---> <!--- Create a ColdFusion image from an existing JPEG file.---> <cfimage source="../cfdocs/images/artgallery/jeff05.jpg" name="myImage"> <!--- Get the width of the image. ---> <cfset width=#ImageGetWidth(myImage)#> <!--- Display the width of the image in pixels. ---> <cfdump var=#width#>