Skip to main content
Ben Nadel at cf.Objective() 2010 (Minneapolis, MN) with: Doug Hughes and Ezra Parker and Dan Wilson and John Mason and Jason Dean and Luis Majano and Mark Mandel and Brian Kotek and Wil Genovese and Rob Brooks-Bilson and Andy Matthews and Simeon Bateman and Ray Camden and Chris Rockett and Joe Bernard and Dan Skaggs and Byron Raines and Barney Boisvert and Simon Free and Steve 'Cutter' Blades and Seth Bienek and Katie Bienek and Jeff Coughlin
Ben Nadel at cf.Objective() 2010 (Minneapolis, MN) with: Doug Hughes Ezra Parker Dan Wilson John Mason Jason Dean Luis Majano Mark Mandel Brian Kotek Wil Genovese Rob Brooks-Bilson Andy Matthews Simeon Bateman Ray Camden Chris Rockett Joe Bernard Dan Skaggs Byron Raines Barney Boisvert Simon Free Steve 'Cutter' Blades Seth Bienek Katie Bienek Jeff Coughlin

Me And Ray Camden On ColdFusion 8 Image Goodness

By
Published in Comments (7)

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

16,125 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 :)

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.

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel
Managed hosting services provided by:
xByte Cloud Logo