Me And Ray Camden On ColdFusion 8 Image Goodness

Posted February 8, 2008 at 9:08 AM by Ben Nadel

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 »
11,246 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 »
319 Comments

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


Feb 14, 2008 at 11:57 AM // reply »
2 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 »
11,246 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:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 25, 2013 at 10:08 AM
Using "//" And ".//" Expressions In XPath XML Search Directives In ColdFusion
@Ben, my question is that i want the current node with its tag and its parent node. i just want only that data. So, give me the solution for that. and remember solution is working on " xpath 1.0 ... read »
May 25, 2013 at 10:01 AM
Using "//" And ".//" Expressions In XPath XML Search Directives In ColdFusion
hey ben, i want get my current node tag and also want the root node tag withing. So, how can i fix it.. ! ... read »
May 24, 2013 at 5:39 PM
Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion
@Adam Oops! My mistake! I hadn't gotten that far in my testing - I'm still baby stepping my way through the process. ... read »
May 24, 2013 at 5:13 PM
Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion
Hi Jason, Thanks for checking up on that, but I still stand firm on my position. :) There are actually two listLast()'s in use, and you're right that the one using a space as a delimiter is fine. ... read »
May 24, 2013 at 4:45 PM
Ask Ben: Manually Enforcing Basic HTTP Authorization In ColdFusion
@Ben I have been lurking your site for quite some time, and haven't stepped up to comment until today. Thanks for all the great info - keep it up! @Adam I believe you are mistaken... as the commen ... read »
May 24, 2013 at 11:21 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@WebManWalking, Ha ha, let's us never speak of justifying "##" notation again :P ... read »
May 24, 2013 at 11:18 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben, Ah, so it was indeed how I vaguely remembered it to be: A direct assignment value = users.id[ i ] causes value to retain the sticky datatype of the query column. Although unnecessary in ... read »
May 24, 2013 at 9:11 AM
Preventing Links In Standalone iPhone Applications From Opening In Mobile Safari
@Brandon, Hi, No, I haven't been able to do that. I have just kept it as it is. ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools