Resizes the image to the size that is specified by the newWidth and newHeight parameters.
public int resize(
int newWidth,
int newHeight,
InterpolationMode InterpolationMode)
Client
|
Parameter
|
Description
|
|
newWidth
|
The width for the new image in pixels.
|
|
newHeight
|
The height for the new image in pixels.
|
|
InterpolationMode
|
The resizing method.
|
0 indicates success; otherwise, failure.
The possible values for the InterpolationMode parameter are those available in the InterpolationMode system enum:
|
Value
|
Resizing method
|
Description
|
|
0
|
InterpolationModeDefault
|
Specifies the default interpolation mode.
|
|
1
|
InterpolationModeLowQuality
|
Specifies a low-quality mode.
|
|
2
|
InterpolationModeHighQuality
|
Specifies a high-quality mode.
|
|
3
|
InterpolationModeBilinear
|
Specifies bilinear interpolation. No pre-filtering is done. This method is not suitable for shrinking an image below 50% of its original size.
|
|
4
|
InterpolationModeBicubic
|
Specifies bicubic interpolation. No pre-filtering is done. This method is not suitable for shrinking an image below 25% of its original size.
|
|
5
|
InterpolationModeNearestNeighbor
|
Specifies nearest-neighbor interpolation.
|
|
6
|
InterpolationModeHighQualityBilinear
|
Specifies high-quality, bilinear interpolation. Pre-filtering is performed to ensure high-quality shrinking.
|
|
7
|
InterpolationModeHighQualityBicubic
|
Specifies high-quality, bicubic interpolation. Pre-filtering is performed to ensure high-quality shrinking. This mode produces the highest quality transformed images.
|