I'm sitting in on Prayank Swaroop's Image Manipulation in ColdFusion session right now. It's the last of three sessions on new features/functionality coming out in ColdFusion 8 (Scorpio). Image manipulation is something a LOT of people have been asking for for quite a long time, so it's nice to see it finally being implemented.
The new cfimage tag and over 45 supporting functions will support the following:
Inputs include URL's, files,
You'll be able to read in all sorts of meta information about images - dimensions, color space, resolution, etc.
Image conversion supports jpg, gif (not animated), png, bmp and tiff. Other formats that can be read/written but have not been tested are FlashPix, etc.
If you're working with jpegs, you can specify the compression rate (0.75 is the default) using the quality attribute of the cfimage tag.
Image manipulation includes Rotate:
Resize:
Border:
Many more functions including imageShear, imageNegative, imageBrighten, imageBlur, etc.
Image resizing can be fixed width and height, proportional, and scale to fit.
Because there are so many functions, with lots of repeating attributes, you can use attribute collections and pass them to the image functions.
Base64 support allows you to embed images in HTML pages and emails. The new tags/functions allow you to do this a little easier than the current cffile/toBase64() method.
The cfimage tag will also support PNG captchas:
Another cool feature is blob support. You'll be able to read and write blobs as well as convert images to blobs, making inserting and retrieving images from a database easy.
Exif and IPTC image metadata standards are supported for JPEG images. You can use the imageGetExifMetaData() and imageGetIPTCMetaData() functions respectively. There currently aren't any write functions, but that is subject to change before release.
There are quite a few drawing functions as well: geometric primitives, cubic and quadratic curves, and more. I think these are going to be interesting. One use case I have is diagraming workflow's. We have a workflow engine we use in several of our applications. It would be pretty cool to use the image drawing functions to actually diagram the workflow within a workflow administration application to make visualizing the workflow easier.
It looks to me like the cfimage tag and related functions in Scorpio are finally going to deliver a pretty powerful feature set that's been sorely lacking in ColdFusion for some time. Kudos to the development team on the implementation so far.
Given the information from the presentation, is there anything you feel the team may be missing?
I wish I could have been there to see the presentation. Image support has been sorely laking from ColdFusion, and I am glad it is making it into 8.
The specifics of the underlying engine weren't discussed, but I believe that they are using the image capabilities in Java 1.5, which should be (from what I've read) a lot better than what's currently available in the CFMX 6/7 world. From the demos I saw, the resizing looked good, but without my own tests, I can't say for sure what the end result is going to be.