ColdFusion master Ray Camden and I have started a project on RIAForge.org - ImageUtils.cfc - which is a collection of image related functions meant to extend the built-in ColdFusion 8 image manipulation functionality. We have kicked it off with four user defined functions:
Draws text on the target image but will confine the text to width of the given text area. If there is more text than will fit on one line, the function automatically wraps the text to multiple lines. In addition to font, style, and size, the function also accepts the text property attributes LineHeight and TextAlign.
Writes the image to ColdFusion 8's temporary image server applet and returns the absolute ("/path") URL to that image. Caution: the image is temporary and will only be available for a few minutes (aprox. 5 minutes).
Creates a drop shadow for the given image using the passed-in offset, blur factor, and drawing color. Caution: the drop shadow will increase the size of the canvas.
This function is meant to extend the functionality of the WriteToBrowser CFImage tag action. In addition to passing in the image, you can also optionally pass in the Alt, Class, and Style attributes to be used in the rendered IMG tag.
That's a good start, more to come soon. If there are any functions that you would like to see added (either existing functions of functions that you want us to generate), please let me know.
The project can be found at:
http://imageutils.riaforge.org/
The demo page can be found at:
http://www.bennadel.com/resources/demo/imageutils/index.cfm
Comments (7) | Post Comment | Ask Ben | Permalink | Other Searches | Print Page
Dig Deep Fitness iPhone Fitness Application Initial Thoughts
Datasource Names For All The Database Tags Within CFTRANSACTION Must Be The Same
Never mind the details, who's the chick :-)
Posted by Tom Chiverton on Feb 8, 2008 at 10:51 AM
Oh sure... I tell you, then you tell some friends, then suddenly her phone's ringing off the hook and I look like the bad guy. I don't think so :)
Posted by Ben Nadel on Feb 8, 2008 at 11:03 AM
I'm not sure if this is built in or not yet in CF8, but is there a good CAPCHA method? One that will create the image and then auto-delete itself after a minute or so.
Posted by Champ on Feb 8, 2008 at 11:34 AM
Hi Ben,
sample image!!! she is HOT like your blog-posts LOL :)
Posted by Sana on Feb 8, 2008 at 12:06 PM
Champ - CAPTCHA is indeed built in. Please read the docs on the CFIMAGE tag.
Posted by Raymond Camden on Feb 9, 2008 at 12:24 PM
I liked the ad you created just above the comments - My husband is happier.... from housewife confessions. Now THAT was creative.
Posted by Chris on Feb 14, 2008 at 11:57 AM
@Chris,
Thanks :)
Posted by Ben Nadel on Feb 14, 2008 at 12:13 PM