IsImage

Description

Determines whether a variable returns a ColdFusion image.

Returns

True, if the value is a ColdFusion image; False, otherwise.

Function syntax

IsImage(name)

History

ColdFusion 8: Added this function.

Parameters

Parameter

Description

name

Required. The ColdFusion variable that is checked.

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>