Image Manipulation
Last updated
Was this helpful?
Last updated
Was this helpful?
Both CFML engines (Lucee & Adobe) have a very extensive and awesome image manipulation library that will allow you to create and manipulate images in an easy syntax. We cannot see every single detail about image manipulation, but it is necessary to understand that this functionality is easy in CFML and it exists.
Apart from having core image functions all functions can be applied as member functions to an image object. Yes, CFML allows you to deal with image objects natively.
You can find some great samples here: and a listing of all manipulation functions here:
Returns a list of image formats that Lucee can read on the operating system where Lucee is deployed.
Returns a list of image formats that Lucee can write on the operating system where Lucee is deployed.
Adds a rectangular border around the outside edge of a image.
Smooths image.
Creates a captcha image
Clears the specified rectangle by filling it with the background color of the current drawing surface.
Copies a rectangular area of an image.
Crops a image to a specified rectangular area.
Draws a circular or elliptical arc.
Draws a rectangle with beveled edges.
Draws a cubic curve.
this function is deprecated, use ImagePaste instead. Draws a image on a image with the baseline of the first character positioned at (x,y) in the image.
Draws a single line defined by two sets of x and y coordinates on a image.
Draws a sequence of connected lines defined by arrays of x and y coordinates.
Draws an oval.
Draws a point at the specified (x,y) coordinate.
Draws a curved line. The curve is controlled by a single point.
Draws a rectangle.
Draws a rectangle with rounded corners.
Draws a text string on a image with the baseline of the first character positioned at (x,y) in the image.
the function ImageFilter allows to execute a filter against a image.
These are passed to the function ImageFilters (see ImageFilter documentation) which convert gray values to colors.
the curves for the wrap grid
These are passed to the function ImageFilters
A warp grid. These are passed to the function ImageFilters (see ImageFilter documentation).
Flips an image across an axis.
return all available
return all available readers and writers
Retrieves the bytes of the underlying image. The bytes are in the same image format as the source image.
Returns the java.awt.BufferedImage object underlying the current image.
Retrieves the Exchangeable Image File Format (EXIF) headers in an image as a CFML structure.
Retrieves the specified EXIF tag in an image.
Retrieves the height of the image in pixels.
Retrieves the International Press Telecommunications Council (IPTC )headers in a image as a struct. The IPTC metadata contains text that describes the image that is stored with it. IPTC metadata includes, but is not limited to, caption, keywords, credit, copyright, object name, created date, byline, headline, and source
Retrieves the value of the IPTC tag for a image.
Retrieves the width of the specified image.
Converts a image to grayscale.
Returns a structure that contains information about the image, such as height, width, color model, size, and filename.
Inverts the pixel values of a image.
Creates a image.
Reads two source images and overlays the second source image on the first source image.
Takes two images and an (x,y) coordinate and draws the second image over the first image with the upper-left corner at coordinate (x,y).
Reads the source pathname or URL and creates a image.
Creates a image from a Base64 string.
Resizes a image.
Rotates a image at a specified point by a specified angle.
Rotates all subsequent drawing on a image at a specified point by a specified angle.
Creates a resized image with the aspect ratio maintained.
Switches antialiasing on or off in rendered graphics.
Sets the background color for the image. The background color is used for clearing a region. Setting the background color only affects the subsequent ImageClearRect calls
Sets the current drawing alpha for images. All subsequent graphics operations use the specified alpha.
Sets the current drawing color for images. All subsequent graphics operations use the specified color.
Sets the drawing stroke for points and lines in subsequent images.
Specifies the degree of transparency of drawing functions.
Sharpens a image by using the unsharp mask filter.
Shears an image either horizontally or vertically.
Shears the drawing canvas.
Copies an image to a new location on the plane.
Translates the origin of the image context to the point (x,y) in the current coordinate system.
Writes a image to the specified filename or destination.
Writes Base64 images to the specified filename and destination.
Writes image to browser.
Sets the paint mode of the image to alternate between the image's current color and the new specified color.
Determines whether a variable returns a image.
Verifies whether an image file is valid.