ColdFusion 9.0 Resources |
ImageShearDescriptionShears an image either horizontally or vertically. For each pixel (x, y) of the destination, the source value at the fractional subpixel position (x', y') is constructed with an Interpolation object and written to the destination. Parameters
UsageUse this function to distort an image. If the direction parameter is set to horizontal, x' = (x - y*shear) and y' = y. If the direction parameter is set to vertical, x' = x and y' = (y - x*shear). Use the ImageSetAntialiasing function to improve the quality of the rendered image. Example<!--- This example shows how to shear an image. ---> <!--- 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")> <!--- Shear the image by a factor of 1 on a horizontal axis. ---> <cfset ImageShear(myImage,1,"horizontal")> <!--- Display the image in a browser. ---> <cfimage source="#myImage#" action="writeToBrowser"> |