image.resize()
Resizes a image.
image.resize( width=string, height=string, interpolation=string, blurFactor=number )
Returns: Image
| Argument | Description |
|---|---|
|
width
string,
required
|
edit
New width of the image. If this value is blank, the width is calculated proportionately to the height. |
|
height
string,
optional
|
edit
New height of the image. If this value is blank, the height is calculated proportionately to the width. |
|
interpolation
string,
optional
|
edit
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
number,
optional
|
edit
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). Valid values are 1-10. |
Examples
edit img=imageNew("",200,200,"RGB","blue");
cfimage(action="writeToBrowser",source=img);writeoutput("</br>");
img.resize( "20%","100");
cfimage(action="writeToBrowser",source=img);writeoutput("</br>");
img.resize( "20%","75");writeoutput("</br>");
cfimage(action="writeToBrowser",source=img);