Flips an image across an axis.
Nothing.
ImageFlip(name
[,transpose
])
ImageBlur, ImageClearRect, ImageCrop, ImageNegative, ImageNew, ImageOverlay, ImagePaste, ImageResize, ImageRotate, ImageScaleToFit, ImageSetAntialiasing, ImageSharpen, ImageShear, ImageTranslate, IsImageFile
ColdFusion 8: Added this function.
Parameter |
Description |
---|---|
name |
Required. The ColdFusion image on which this operation is performed. |
transpose |
Optional. Transpose the image:
|
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 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 a antidiagonal axis. ---> <cfset ImageFlip(myImage,"antidiagonal")> <!--- Display the modified image in a browser. ---> <cfimage source="#myImage#" action="writeToBrowser">