I've added a new function, TileImage(), to Ray Camden's and my ImageUtils.cfc. This new function will completely tile the given graphic onto the given ColdFusion image canvas. Think of this as a repeated background image on a web site or a background pattern on a FireWorks shape. The method looks like this:
TileImage( Image, TileImage [, X [, Y ]] )
The image onto which we are tiling the other image.
The image that we are going to be tiling onto our canvas
The optional X coordinate from which we are going to start tiling. This defaults to zero but can be set to positive or negative number.
The optional Y coordinate from which we are going to start tiling. This defaults to zero but can be set to positive or negative number.
Let's take a quick look at this baby in action:
Launch code in new window » Download code as text file »
Here, we are creating a blank canvas and then tiling our cute_blonde.jpg image onto it. We are scaling down the tile image just so that it tiles, otherwise it would be roughly the same size as our blank canvas. Running the above code, we get the following output:
| | | | ||
| | ![]() | | ||
| | | |
Here is the code for this ColdFusion user define function for image manipulation:
Launch code in new window » Download code as text file »
Download Code Snippet ZIP File
Comments (0) | Post Comment | Ask Ben | Permalink | Other Searches | Print Page
Cleaning High Ascii Values For Web Safeness In ColdFusion
Fusion Authority Quarterly Update - Volume II, Issue III
There are no comments posted for this web log entry.