For the complete experience, please enable JavaScript in your browser. Thank you!

  • Creative Cloud
  • Photoshop
  • Illustrator
  • InDesign
  • Premiere Pro
  • After Effects
  • Lightroom
  • See all
  • See plans for: businesses photographers students
  • Document Cloud
  • Acrobat DC
  • eSign
  • Stock
  • Elements
  • Marketing Cloud
  • Analytics
  • Audience Manager
  • Campaign
  • Experience Manager
  • Media Optimizer
  • Target
  • See all
  • Acrobat Reader DC
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player
  • All products
  • Creative Cloud
  • Individuals
  • Photographers
  • Students and Teachers
  • Business
  • Schools and Universities
  • Marketing Cloud
  • Document Cloud
  • Stock
  • Elements
  • All products
  • Get Support
    Find answers quickly. Contact us if you need to.
    Start now >
  • Learn the apps
    Get started or learn new ways to work.
    Learn now >
  • Ask the community
    Post questions and get answers from experts.
    Start now >
    • About Us
    • Careers At Adobe
    • Investor Relations
    • Privacy  |  Security
    • Corporate Responsibility
    • Customer Showcase
    • Events
    • Contact Us
News
    • 3/22/2016
      Adobe Summit 2016: Are You An Experience Business?
    • 3/22/2016
      Adobe Announces Cross-Device Co-op to Enable People-Based Marketing
    • 3/22/2016
      Adobe and comScore Advance Digital TV and Ad Measurement
    • 3/22/2016
      Adobe Marketing Cloud Redefines TV Experience
Creating and Manipulating ColdFusion Images / 

About ColdFusion images

Adobe Community Help


Applies to

  • ColdFusion

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

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

Functions and actions

Verify whether a ColdFusion variable returns an image

IsImage function

Verify whether a file is a valid image

IsImageFile function

Create thumbnail images

ImageScaleToFit function, the ImageResize function, or the resize action of the cfimage tag

Create a watermark

ImageSetDrawingTransparency function with any of the ImageDraw functions and the ImagePaste function

Get information about an image (for example, so you can enforce size restrictions)

ImageGetHeight and the ImageGetWidth functions or the ImageInfo function

Enforce compression on JPEG images

quality attribute of the write action of the cfimage tag or the ImageWrite function

Convert an image from one image file format to another (for example, convert a BMP file to a JPEG)

cfimage tag or ImageRead and ImageWrite functions

Convert an image file to a Base64 string

cfimage tag or the ImageWriteBase64 function

Create a ColdFusion image from a Base64 string

ImageReadBase64 function

Insert a ColdFusion image as a Binary Large Object Bitmap (BLOB) in a database

ImageGetBlob function within a cfquery statement

Create an image from a BLOB in a database

cfimage tag or the ImageNew function with a cfquery statement

Create an image from a binary object

cffile tag to convert an image file to a binary object and then pass the binary object to the ImageNew function

Create a Completely Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA) image

captcha action of the cfimage tag

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 cfimage tag to create a ColdFusion image and as a shortcut to commonly performed image functions, such as resizing an image, adding a border to an image, and converting an image to a different file format. You can use the cfimage tag independently or in conjunction with Image functions. You can pass a ColdFusion image created with the cfimage tag to one or more Image functions to perform complex image manipulation operations.
The following table summarizes the cfimage tag actions:

Action

Description

border

Creates a rectangular border around the outer edge of an image.

captcha

Creates a CAPTCHA image.

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.

read

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.

resize

Resizes the height and width of an image.

rotate

Rotates an image by degrees.

write

Writes the image to a file. You can use the write action to generate lower-resolution JPEG files. Also, use the write action to convert images to other file formats, such as PNG and GIF.

writeToBrowser

Writes one or more images directly to a browser. Use this action to test the appearance of a single image or write multiple images to the browser without saving the images to files.

For more information, see the cfimage tag in the CFML Reference.

Image functions

ColdFusion provides more than 50 Image functions that expand on the functionality of the cfimage tag. You can pass images created with the cfimage tag to Image functions or create images with the ImageNew function. The following table groups the Image functions by category:

Category

Image functions

Verifying images and supported image formats

IsImage, IsImageFile, GetReadableImageFormats, GetWriteableImageFormats

Retrieving image information

ImageGetEXIFTag, ImageGetEXIFMetadata, ImageGetIPTCMetadata, ImageGetHeight, ImageGetIPTCTag, ImageGetWidth, ImageInfo, ImageGetMetadata

Reading, writing, and converting images

ImageGetBlob, ImageGetBufferedImage, ImageNew, ImageRead, ImageReadBase64, ImageWrite, ImageWriteBase64

Manipulating images

ImageAddBorder, ImageBlur, ImageCopy, ImageCrop, ImageFlip, ImageGrayscale, ImageNegative, ImageOverlay, ImagePaste, ImageResize, ImageRotate, ImageScaleToFit, ImageSharpen, ImageShear, ImageTranslate

Drawing lines, shapes, and text

ImageDrawArc, ImageDrawBeveledRect, ImageDrawCubicCurve, ImageDrawLine, ImageDrawLines, ImageDrawOval, ImageDrawPoint, ImageDrawQuadraticCurve, ImageDrawRect, ImageDrawRoundRect, ImageDrawText

Setting drawing controls

ImageClearRect, ImageRotateDrawingAxis, ImageSetAntialiasing, ImageSetBackgroundColor, ImageSetDrawingColor, ImageSetDrawingStroke, ImageSetDrawingTransparency, ImageShearDrawingAxis, ImageTranslateDrawingAxis, ImageXORDrawingMode

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Choose your region United States (Change)   Products   Downloads   Learn & Support   Company
Choose your region Close

Americas

Europe, Middle East and Africa

Asia Pacific

  • Brasil
  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Cyprus - English
  • Česká republika
  • Danmark
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Greece - English
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • Malta - English
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • Southeast Asia (Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam) - English
  • 台灣

Commonwealth of Independent States

  • Includes Armenia, Azerbaijan, Belarus, Georgia, Moldova, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine, Uzbekistan

Copyright © 2016 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

AdChoices