ColdFusion 9.0 Resources |
ImageTranslateParameters
UsageFor each pixel (x, y) of the destination, the source value at the fractional subpixel position (x - xTrans, y - yTrans) is constructed with an interpolation object and written to the destination. If both xTrans and yTrans are integral, the operation wraps the source image to change the image’s position in the coordinate plane. Use the ImageSetAntialiasing function to improve the quality of the rendered image. Example<!--- Create a ColdFusion image from an existing JPEG file. ---> <cfimage source="../cfdocs/images/artgallery/aiden01.jpg" name="myImage"> <!--- Turn on antialiasing to improve image quality. ---> <cfset ImageSetAntialiasing(myImage,"on")> <!--- Offset the image's position to (20,10). ---> <cfset ImageTranslate(myImage,20,10)> <!--- Display the offset image in a browser. ---> <cfimage source="#myImage#" action="writeToBrowser"> |