Whatever message this page gives is out now! Go check it out!

ImageFlip

Last update:
May 18, 2026

Description

Flips an image across an axis.

Returns

Nothing.

Category

Function syntax

ImageFlip(name [, transpose])

See also

ImageBlur, ImageClearRect,{{[ImageCrop]}}, ImageNegative, ImageNew, ImageOverlay, ImagePaste, ImageResize, 
 ImageRotate, ImageScaleToFit, ImageSetAntialiasing, ImageSharpen, ImageShear, 
 ImageTranslate, IsImageFile

History

ColdFusion 8: Added this function.

Parameters

ParameterDescription
nameRequired. The ColdFusion image on which this operation is performed.  
transpose
Optional. Transpose the image:
  • vertical: Flip an image across an imaginary horizontal line that runs through the center of the image (default).
  • horizontal: Flip an image across an imaginary vertical line that runs through the center of the image.
  • diagonal: Flip an image across its main diagonal that runs from the upper-left to the lower-right corner.
  • antidiagonal: Flip an image across its main diagonal that runs from the upper-right to the lower-left corner.
  • {{("90
180270"- Rotate an image clockwise by 90, 180, or 270 degrees.

Usage

If you do not specify the transpose parameter for the ImageFlip function, the image is transposed on a vertical axis, creating an image that is an upside-down version of the source. Use the ImageSetAntialiasing function to improve the quality of the rendered image.

Example

Example 1
<!--- This example shows how to rotate an image by 270 degrees. ---> 
<!--- Create a ColdFusion image from an existing JPEG file. ---> 
<cfimage source="../cfdocs/images/artgallery/paul03.jpg" name="myImage"> 
<!--- Turn on antialiasing to improve image quality. ---> 
<cfset ImageSetAntialiasing(myImage,"on")> 
<!--- Rotate the image by 270 degrees. ---> 
<cfset ImageFlip(myImage,"270")> 
<!--- Display the modified image in a browser. ---> 
<cfimage source="#myImage#" action="writeToBrowser">
Example 2
<!--- This example shows how to flip an image on a vertical axis. ---> 
<!--- Create a ColdFusion image from an existing JPEG file. ---> 
<cfimage source="../cfdocs/images/artgallery/paul03.jpg" name="myImage"> 
<!--- Turn on antialiasing to improve image quality. ---> 
<cfset ImageSetAntialiasing(myImage,"on")> 
<!--- Flip the image so that it is upside down. ---> 
<cfset ImageFlip(myImage,"vertical")> 
<!--- Display the modified image in a browser. ---> 
<cfimage source="#myImage#" action="writeToBrowser">
Example 3
<!--- This example shows how to flip an image on a horizontal axis. ---> 
<!--- Create a ColdFusion image from an existing JPEG file. ---> 
<cfimage source="../cfdocs/images/artgallery/paul03.jpg" name="myImage"> 
<!--- Turn on antialiasing to improve image quality. ---> 
<cfset ImageSetAntialiasing(myImage,"on")> 
<!--- Flip the image so that it is a mirror image of the source. ---> 
<cfset ImageFlip(myImage,"horizontal")> 
<!--- Display the modified image in a browser. ---> 
<cfimage source="#myImage#" action="writeToBrowser">
Example 4
<!--- This example shows how to flip an image on a diagonal axis. ---> 
<!--- Create a ColdFusion image from an existing JPEG file. ---> 
<cfimage source="../cfdocs/images/artgallery/paul03.jpg" name="myImage"> 
<!--- Turn on antialiasing to improve image quality. ---> 
<cfset ImageSetAntialiasing(myImage,"on")> 
<!--- Flip the image on a diagonal axis. ---> 
<cfset ImageFlip(myImage,"diagonal")> 
<!--- Display the modified image in a browser. ---> 
<cfimage source="#myImage#" action="writeToBrowser">
Example 5
<!--- This example shows how to flip an image on an antidiagonal axis. ---> 
<!--- Create a ColdFusion image from an existing JPEG file. ---> 
<cfimage source="../cfdocs/images/artgallery/paul03.jpg" name="myImage"> 
<!--- Turn on antialiasing to improve image quality. ---> 
<cfset ImageSetAntialiasing(myImage,"on")> 
<!--- Flip the image on an antidiagonal axis. ---> 
<cfset ImageFlip(myImage,"antidiagonal")> 
<!--- Display the modified image in a browser. ---> 
<cfimage source="#myImage#" action="writeToBrowser">

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page