CFImage Presentation Outline

by Pete Freitag

I gave a presentation on ColdFusion 8's CFIMAGE tag, Image Functions, and Foundeo's CFImage Effects Component yesterday to the Albany, NY CFUG.

I have made the code samples & slides available online. Feel free to use this presentation at your local CFUG, just take note of the terms of use on the aforementioned link.

CFIMAGE & Image Functions Presentation Outline

Image Processing in ColdFusion 8

Action attribute values for CFIMAGE tag

Example: Resize an Image

<cfimage action="resize" source="sourceFile" destination="destFile" height="num" width="num">

Code Example 1: Resize an Uploaded Image

See source code download above.

Suppose you only wanted to resize big images

You need to know the height and width

Get Image Info using CFIMAGE

<cfimage action="info" source="filePath" structName="variableName">
<cfdump var="#variableName#">

Code Example 2: Image Info

See source code download above.

Code Example 3: Conditionally Resize an Image

See source code download above.

CAPTCHA Codes

Stands for: Completely Automated Public Turing test to tell Computers and Humans Apart

<cfimage action="captcha" text="anything" width="50" height="300">

Code Example 4: CAPTCHA Images Generated with CFIMAGE

See source code download above.

Code Example 5: CAPTCHA Form Example

This example shows how to code a form using captcha's, see the code download link above.

Image Functions in ColdFusion 8

You can do things like:

Code Example 6: Build a button from scratch using Image Functions

See source code download above

But what if you wanted...

Then you need Foundeo's CFImage Effects!

Finished up with a demo of CFImage Effects.

The Fixinator Code Security Scanner for ColdFusion & CFML is an easy to use security tool that every CF developer can use. It can also easily integrate into CI for automatic scanning on every commit.