Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 965

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
Task
Enforce compression on JPEG images
Convert an image from one image file format to another (for
example, convert a BMP file to a JPEG)
Convert an image file to a Base64 string
Create a ColdFusion image from a Base64 string
Insert a ColdFusion image as a Binary Large Object Bitmap
(BLOB) in a database
Create an image from a BLOB in a database
Create an image from a binary object
Create a Completely Automated Public Turing test to tell
Computers and Humans Apart (CAPTCHA) image
The ColdFusion image
A ColdFusion image is a construct that is native to ColdFusion. The ColdFusion image contains image data that it
reads from a source. The source can be an image file or another ColdFusion image, which is expressed as a ColdFusion
image variable. The ColdFusion image variable lets you manipulate information dynamically in memory. Optionally,
you can write a ColdFusion image to a file, to a database column, or to a browser.
The cfimage tag
You use the
tag to create a ColdFusion image and as a shortcut to commonly performed image functions,
cfimage
such as resizing an image, adding a border to an image, and converting an image to a different file format. You can use
the
tag independently or in conjunction with
cfimage
the
tag to one or more
cfimage
The following table summarizes the
Action
Description
border
Creates a rectangular border around the outer edge of an image.
Creates a CAPTCHA image.
captcha
convert
Converts an image from one file format to another.
info
Creates a ColdFusion structure that contains information about the image, including the color model, height, width,
and source of the image.
Reads an image from the specified local file path or URL. If you do not specify an action explicitly, ColdFusion uses
read
as the default value.
read
resize
Resizes the height and width of an image.
Rotates an image by degrees.
rotate
write
Writes the image to a file. You can use the
action to convert images to other file formats, such as PNG and GIF.
Writes one or more images directly to a browser. Use this action to test the appearance of a single image or write
writeToBrowser
multiple images to the browser without saving the images to files.
For more information, see the cfimage tag in the CFML Reference.
Functions and actions
quality
ImageWrite
cfimage
cfimage
ImageReadBase64
ImageGetBlob
cfimage
cffile
tag to convert an image file to a binary object and then pass the
binary object to the
captcha
Image
functions to perform complex image manipulation operations.
Image
tag actions:
cfimage
write
Last updated 1/20/2012
attribute of the
write
action of the
function
tag or
and
ImageRead
ImageWrite
tag or the
ImageWriteBase64
function
function
function within a
cfquery
tag or the
function with a
ImageNew
ImageNew
function
action of the
cfimage
tag
functions. You can pass a ColdFusion image created with
action to generate lower-resolution JPEG files. Also, use the
cfimage
tag or the
functions
statement
statement
cfquery
write
960

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents