Creating A Tiled Image Background With TileImage()

<!--- Create imageUtils.cfc instance. --->
<cfset objUtils = CreateObject( "component", "imageUtils" ).Init() />
 
<!--- Create a blank canvas. --->
<cfset objImage = ImageNew( "", 500, 340, "rgb" ) />
 
<!--- Read in the image that we are going to tile. --->
<cfimage
	action="read"
	source="./cute_blonde.jpg"
	name="objTile"
	/>
 
<!--- Scale the tile image so that it will tile better. --->
<cfimage
	action="resize"
	source="#objTile#"
	height="20%"
	width="20%"
	name="objTile"
	/>
 
<!---
	Tile the image onto our canvas. You can supply an optional
	starting X and Y coordniate for the pasting operations; I
	have included them in this method call and just set them
	to zero (same as if I didn't include them at all).
--->
<cfset objUtils.TileImage(
	objImage,
	objTile,
	0,
	0
	) />
 
<!--- Write to broser. --->
<cfimage
	action="writetobrowser"
	source="#objImage#"
	/>

For Cut-and-Paste