isImage
Description
Determines whether a variable returns a ColdFusion image.
Categories
Related
History
ColdFusion
8: Added this function.
Syntax
IsImage(name)
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| name | Required. The ColdFusion variable that is checked. |
Returns
True,
if the value is a ColdFusion image; False, otherwise.
Usage
Use this function to determine whether a variable returns a ColdFusion image.
Example
<cfif IsImageFile("images/#form.art#")>
<cfset myImage=ImageNew("images/#form.art#")>
...
<cfset IsImage("#myImage#")>
<cfimage action="writeToBrowser" source="#myImage#">
</cfif>