imageGetBufferedImage

Description

Returns the java.awt.BufferedImage object underlying the current ColdFusion image.

Categories

Related

History

ColdFusion 8: Added this function.

Syntax

ImageGetBufferedImage(name)

Attributes

AttributeDescriptionRequiredDefault
nameRequired. The ColdFusion image on which this operation is performed.

Returns

The java.awt.BufferedImage object.

Usage

Use this function to return an image object that can be used with other Java Abstract Windowing Toolkit (AWT) objects embedded in the page.

Example

<!--- This example shows how to create a ColdFusion image, modify it, and retrieve the width of the buffered image. ---> 
<!--- Create a ColdFusion image from an existing JPEG file. ---> 
<cfimage source="../cfdocs/images/artgallery/paul05.jpg" name="myImage"> 
<!--- Blur the image by an order of 10. ---> 
<cfset ImageBlur(myImage,10)> 
<!--- Get the blurred image from the buffer and set it to variable x. ---> 
<cfset x = ImageGetBufferedImage(myImage)> 
<!--- Return the width of the buffered image. ---> 
<cfoutput>#x.getWidth()# 
</cfoutput>