cfimage
8
3

Overview ColdFusion Open BlueDragon Lucee

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.

Attributes

Name Required Type Default Description
8
3
action No String read The action to take. Must be one of the following: border captcha convert info read resize rotate write writeToBrowser You do not need to specify the default action, read, explicitly. (optional, default=read)
8
3
angle No Numeric Angle in degrees to rotate the image. You must specify an integer for the value. (required)
3
base64 No should action "writetobrowser" embed the source of the image as base64 encoded string, default is false.
brightness No The value to which to adjust the brightness of the image by
8
3
color No String (border) Border color. Hexadecimal value or supported named color. For a hexadecimal value, use the form "##xxxxxx" or "xxxxxx". (required)
contrast No The value to which to adjust the contrast of the image by
destfile No Required if ACTION=EDIT,CROP,ROTATE,BORDER,GRAYSCALE, Optional if ACTION=INFO. The file name of the new image file to be created by the CFIMAGE tag. Can be either a full physical path or a relative path (see the URIDirectory attribute).
8
3
destination No 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. (optional)
8
3
difficulty No String Level of complexity of the CAPTCHA text. Specify one of the following levels of text distortion: high medium low (optional, default=low)
fontcolor No Specifies the font color of the text label to be added to the image. Accepts any value that is valid for use in the FONT tag.
8
3
fonts No 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.
8
3
fontSize No Numeric Font size of the text in the CAPTCHA image. The value must be an integer. (optional)
8
3
format No 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. (optional, Default=PNG)
8
3
height No 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. (optional)
10
interpolation No String highestQuality Indicates algorithm to use when resizing the image. The default is highestQuality.
8
3
isBase64 No Boolean Specifies whether the source is a Base64 string. The isBase64 values are: yes: the source is a Base64 string. no: the source is not a Base64 string. (optional, default=no)
8
3
name No String Name of the ColdFusion image variable.
nameconflict No Indicates the behavior of the CFIMAGE tag when the file specified by destFile already exists. Valid values are ERROR, which generates a runtime error; SKIP, which causes the CFIMAGE tag to do nothing without generating an error; OVERWRITE, to overwrite the existing image; and, MAKEUNIQUE, which causes CFIMAGE to create a new unique file name for the new image file
8
3
overwrite No Boolean Valid only if the destination attribute is specified. The overwrite values are: yes: overwrites the destination file. no: does not overwrite the destination file. If the destination file already exists, ColdFusion generates an error if the overwrite option is not set to yes. (optional, default=no)
3
passthrough No HTML attributes that are not explicitly supported by cfimage. If you specify an attribute and value, they are passed to the tag "img".
position No The position of the text label to add to the image; valid valued are 'north' and 'south'. Defaults to 'south'.
8
3
quality No Numeric 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). (optional, default=0.75)
3
result No Name of the ColdFusion structure to be created (alias for structname).
8
3
source No 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.............." (required)
srcfile No The file name of the source image file that is to be modified. Can be either a full physical path or a relative path (see the URIDirectory attribute).
8
3
structName No String () Name of the ColdFusion structure to be created. (required)
8
3
text No String Text string displayed in the CAPTCHA image. Use capital letters for better readability. (required)
8
3
thickness No Numeric 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. (optional, default=1)
type No The image file type, either GIF, PNG or JPEG. If this attribute is not specified, the CFIMAGE tag attempts to determine the image type based on the file name extension.
uridirectory No If YES, relative paths specified in srcFile and destFile are calculated from the web server document root directory. If NO, relative paths are calculated as relative to the current file.
8
3
width No 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. (required)
x No For ACTION=CROP, the starting X position for the crop
y No For ACTION=CROP, the starting Y position for the crop