Me And Ray Camden On ColdFusion 8 Image Goodness

Posted February 8, 2008 at 9:08 AM

Tags: ColdFusion

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:

DrawTextArea()

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.

GetUrl()

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).

MakeShadow()

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.

WriteToBrowser()

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




Reader Comments

Feb 8, 2008 at 10:51 AM // reply »
42 Comments

Never mind the details, who's the chick :-)


Feb 8, 2008 at 11:03 AM // reply »
8,824 Comments

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 :)


Feb 8, 2008 at 11:34 AM // reply »
1 Comments

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.


Feb 8, 2008 at 12:06 PM // reply »
14 Comments

Hi Ben,

sample image!!! she is HOT like your blog-posts LOL :)


Feb 9, 2008 at 12:24 PM // reply »
262 Comments

Champ - CAPTCHA is indeed built in. Please read the docs on the CFIMAGE tag.


Feb 14, 2008 at 11:57 AM // reply »
1 Comments

I liked the ad you created just above the comments - My husband is happier.... from housewife confessions. Now THAT was creative.


Feb 14, 2008 at 12:13 PM // reply »
8,824 Comments

@Chris,

Thanks :)


Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Formatting: <strong>bold</strong> <em>italic<em>







  • Help Wanted - Find Your Next ColdFusion Job
Recent Blog Comments
Sep 5, 2010 at 6:35 PM
Muscle: Confessions Of An Unlikely Bodybuilder By Samuel Wilson Fussell
@Ben, Certainly will/ Thanks Sean ... read »
Sep 5, 2010 at 6:26 PM
Experimenting With HTML5's Cache Manifest For Offline Web Applications
@Ben, Yes, I am using Firefox Portable. At the moment I run a portable web server on the stick which holds and serves all files. The good thing is, I can run PHP pages on the stick to do requests to ... read »
Sep 5, 2010 at 5:05 PM
Ask Ben: Finding XML Nodes That Have Children With The Given Case-Insensitive Phrase
@Murray, Good point on the clarification. ... read »
Sep 5, 2010 at 4:40 PM
Ask Ben: Finding XML Nodes That Have Children With The Given Case-Insensitive Phrase
Actually, for the benefit of anyone reading this who might want to make sense of the question post, the first <td> had a bold tag surrounding the numeral 6. So, the problem was that the xmlSear ... read »
Sep 5, 2010 at 4:35 PM
Ask Ben: Finding XML Nodes That Have Children With The Given Case-Insensitive Phrase
Thanks Ben. Much appreciated. ... read »
Sep 5, 2010 at 3:39 PM
jQuery forEach() Experiment For Branch-Wise Implicit Iteration
@Sereal, Wow - what a super flattering thing to say :) I really appreciate that! I'm so happy that this stuff is providing value for you. ... read »
Sep 5, 2010 at 3:32 PM
Escaping Form Values - Understanding The ColdFusion htmlEditFormat() Life Cycle
@Ben, There's also a performance benefit to escaping on database insert since it only needs to be done ONCE - when inserting. When you escape on output, this needs to be done every time you output ... read »
Sep 5, 2010 at 3:30 PM
XML Building / Parsing / Traversing Speed In ColdFusion
@Don, I've played around with a couple of approaches to dealing with XML documents that are too large to be parsed in one shot. In one, approach, I use Regular Expression to try and parse one tag a ... read »