Adds a rectangular border around the outside edge of a ColdFusion image.
imageAddBorder(name, thickness [, color] [, bordertype])
→ returns void
someImage.addBorder(thickness [, color] [, bordertype])
black
constant
zero
constant
copy
reflect
wrap
Draw a green border around the outside edge of the red border.
<cfset imageAddBorder(myImage,5,"green")>
Add a 50-pixel-wide border to the outside edge of the image that is a tiled version of the image itself.
<cfset imageAddBorder(myImage,50,"","wrap")>
Create the border.
<cfset imageAddBorder(myImage,100,"","reflect")>
Create a ColdFusion image from an existing JPEG file.
<cfset imageAddBorder(myImage,100,"","copy")>
CF 11+ Lucee 4.5+ Add border with optional color parameter
imgObj = imageRead("http://cfdocs.org/apple-touch-icon.png");
imgObj.addBorder(5,"005100");
cfimage(action="writeToBrowser", source=imgObj);
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.