Creates a ColdFusion image that can be manipulated by using image functions. You can use the cfimage tag to perform common image manipulation operations as a shortcut to Image functions. You can use the cfimage tag independently or in conjunction with image functions.
(border) Border color. Hexadecimal value or supported named color. For a hexadecimal value, use the form "##xxxxxx" or "xxxxxx". (required)
destination
string
Absolute or relative pathname where the image output is written. The image format is determined by the file extension. The convert and write actions require a destination. The border, captcha, resize, and rotate actions require either a name attribute or a destination attribute. You can specify both. Scorpio supports only CAPTCHA images in PNG format. If you do not enter a destination, the CAPTCHA image is placed inline in the HTML output and displayed in the web browser.
difficulty
string
Default:low
Level of complexity of the CAPTCHA text.
Values:
high
medium
low
fontSize
numeric
Font size of the text in the CAPTCHA image. The value must be an integer.
format
string
Format of the image displayed in the browser. If you do not specify a format, the image is displayed in PNG format. You cannot display a GIF image in a browser. GIF images are displayed in PNG format.
Values:
png
jpg
jpeg
height
numeric
Height in pixels of the image. For the resize attribute, you also can specify the height as a percentage (an integer followed by the "%" symbol). The value must be an integer.
isBase64
boolean
Default:false
Specifies whether the source is a Base64 string or not.
Values:
true
false
name
string
Name of the ColdFusion image variable to create. The read action requires name attribute. The border, resize, and rotate options require a name attribute or a destination attribute. You can specify both.
overwrite
boolean
Default:false
Valid only if the destination attribute is specified. If the destination file already exists, ColdFusion generates an error if the overwrite option is not set to yes.
Values:
true
false
quality
numeric
Default:0.75
Quality of the JPEG destination file. Applies only to files with an extension of JPG or JPEG. Valid values are fractions that range from 0 through 1 (the lower the number, the lower the quality).
source
any
URL of the source image; for example, "http://www.google.com/ images/logo.gif" Absolute or relative pathname of the source image; for example, "c:\wwwroot\images\logo.jpg" ColdFusion image variable containing another image, BLOB, or byte array; for example, "#myImage#" Base64 string; for example, "data:image/jpg;base64,/9j/ 4AAQSkZJRgABAQA.............."
structName
string
Name of the ColdFusion structure to be created.
text
string
Text string displayed in the CAPTCHA image. Use capital letters for better readability.
thickness
numeric
Default:1
Border thickness in pixels. The border is added to the outside edge of the source image, increasing the image area accordingly. The value must be an integer.
width
string
Width in pixels of the image. For resize, you also can specify the width as a percentage (an integer followed by the "%" symbol). The value must be an integer.
fonts
string
One or more valid fonts to use for the CAPTCHA text. Separate multiple fonts with commas. ColdFusion supports only the system fonts that the JDK can recognize.
interpolation
string
Default:highestQuality
CF 10+ Used when action=resize determines the interpolation algorithm to use.
Values:
highestQuality
highQuality
mediumQuality
highestPerformance
highPerformance
mediumPerformance
nearest
bilinear
bicubic
bessel
blackman
hamming
hanning
hermite
lanczos
mitchell
quadratic
Links more information about cfimage
CFML Image Functions Listing - List of image manipulation functions in CFML. Most of what you can do with the cfimage tag can also be done with image functions.
Examples
Sample code using the cfimage tag
Add an Example for: cfimage
Use this form to create the Serialized JSON string needed to add an example into the docs.