Whatever message this page gives is out now! Go check it out!
ImageResize(image, width, height [, interpolation, blurFactor])Parameter | Description |
image | Required. The ColdFusion image on which this operation is performed. |
width | Required. New width of the ColdFusion image.If this value is blank, the width is calculated proportionately to the height. |
height | Required. New height of the ColdFusion image.If this value is blank, the height is calculated proportionately to the width. |
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 of blur factor is between 0-10. |
Value | Named equivalents | Description |
highestQuality (default) | lanczos | Highest image quality with low performance |
highQuality, mediumPerformance | mitchell, quadratic | Good image quality with slightly higher performance |
mediumQuality, highPerformance | hamming, hanning , hermite | Medium quality image with medium performance |
blackman, bessel | Slightly distorted image quality with high performance | |
highestPerformance | nearest, bicubic, bilinear | Poor image quality with highest performance |
<cfset myImage=ImageNew("http://www.google.com/images/logo_sm.gif")>
<cfset ImageResize(myImage,"50%","","blackman",2)>
<!--- Save the modified image to a file called "test_myImage.jpeg" and display the image in a browser. --->
<cfimage source="#myImage#" action="write" destination="test_myImage.jpeg" overwrite="yes">
<!--- Display the source image and the thumbnail image. --->
<img src="http://www.google.com/images/logo_sm.gif"/>
<img src="test_myImage.jpeg"/>