Whatever message this page gives is out now! Go check it out!
ImageScaleToFit(image, fitWidth, fitHeight [, interpolation , blurFactor])Parameter | Description |
image | Required. The ColdFusion image on which this operation is performed. |
fitWidth | Required. The width of the bounding box in pixels. You can specify an integer, or an empty string ("" ) if the fitHeight is specified. See the Usage section for more information. |
fitHeight | Required. The height of the bounding box in pixels. You can specify an integer, or an empty string ("" ) if the fitWidth is specified. See the Usage section for more information. |
interpolation | Optional. The interpolation method for resampling. You can specify a specific interpolation algorithm by name (for example, hamming), by image quality (for example, mediumQuality), or by performance (for example, highestPerformance). Valid values are:
|
blurFactor | Optional. The blur factor used for resampling. The higher the blur factor, the more blurred the image (also, the longer it takes to resize the image). The valid range for the blur factor is between 0-10. |
<cfset ImageScaleToFit(myImage,100,"")><cfset ImageScaleToFit(myImage,"",100)><cfset ImageScaleToFit(myImage,100,200)><!--- Create a ColdFusion image from an existing JPEG file. --->
<cfimage source="../cfdocs/images/artgallery/jeff05.jpg" name="myImage">
<!--- Turn on antialiasing to improve image quality. --->
<cfset ImageSetAntialiasing(myImage,"on")>
<cfset ImageScaleToFit(myImage,100,"","lanczos")>
<!--- Display the modified image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser">