Creating And Manipulating Coldfusion Images - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
<cfif IsDDX("watermark.ddx")>
<!--- The following code uses the processddx action of the cfpdf tag to create a text-
string watermark. --->
<!--- This code creates a structure for the input files. --->
<cfset inputStruct=StructNew()>
<cfset inputStruct.Doc1="FiledForms\#fields.filerID#.pdf">
<!--- This code creates a structure for the output file. --->
<cfset outputStruct=StructNew()>
<cfset outputStruct.Out1="FiledForms\#fields.filerID#.pdf">
<!--- This code processes the DDX instructions and applies the watermark to the form. --->
<cfpdf action="processddx" ddxfile="watermark.ddx" inputfiles="#inputStruct#"
outputfiles="#outputStruct#" name="Final">
</cfif>
<h3>Tax Form Completed</h3>
<p>Thank you for filing your tax form on line. Copy this URL to view or download your filed
tax form:</p>
<cfoutput>
<a href="http://localhost:8500/Lion/FiledForms/#fields.filerID#.pdf">
Link to your completed tax form</a>
</cfoutput>

Creating and Manipulating ColdFusion Images

You can use Adobe ColdFusion to create and manipulate images, retrieve and store images in a database, retrieve
image information for indexes and searches, convert images from one format to another, and write images to the hard
drive.
About ColdFusion images
ColdFusion lets you create and manipulate images dynamically. With ColdFusion, you can automate many image
effects and drawing functions that you perform manually in Adobe® Photoshop® or other imaging software packages
and integrate the images in your application. For example, contributors to a website can upload photos in different
formats. You can add a few lines of code to your ColdFusion application to verify the images, reformat the images to
a standard size and appearance, write the modified images to a database, and display the images in a browser.
The following table describes a few of the tasks you can perform with ColdFusion images:
Task
Verify whether a ColdFusion variable returns an image
Verify whether a file is a valid image
Create thumbnail images
Create a watermark
Get information about an image (for example, so you can
enforce size restrictions)
Functions and actions
function
IsImage
IsImageFile
function
function, the
ImageScaleToFit
action of the
tag
cfimage
ImageSetDrawingTransparency
functions and the
ImagePaste
and the
ImageGetHeight
function
Last updated 1/20/2012
function, or the
ImageResize
function with any of the
ImageDraw
function
functions or the
ImageGetWidth
959
resize
ImageInfo

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents