Flips an image across an axis.
imageFlip(name, transpose)
returns void
someImage.flip(transpose)
Name | Type | Required | Default | Description | Values | |
---|---|---|---|---|---|---|
name | string | Yes | The image on which this operation is performed. | |||
transpose | string | Yes | vertical | Transpose the image. vertical: Flip an image across an imaginary horizontal line that runs through the center of the image. 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. Or rotate an image clockwise by 90, 180, or 270 degrees. |
/Users/garethedwards/development/github/cfdocs/docs/functions/imageflip.md | 270 |
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">
CF11+ Lucee4.5+ Flip the image vertically
imgObj = imageRead("http://cfdocs.org/apple-touch-icon.png");
imgObj.flip("vertical");
cfimage (action="writeToBrowser", source=imgObj);