Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Resizes the image to the size that is specified by the newWidth and newHeight parameters.
Syntax
public int resize(
int newWidth,
int newHeight,
InterpolationMode InterpolationMode)
Run On
Client
Parameters
- newWidth
Type: int
The width for the new image in pixels.
- newHeight
Type: int
The height for the new image in pixels.
- InterpolationMode
Type: InterpolationMode Enumeration
The resizing method.
Return Value
Type: int
0 indicates success; otherwise, failure.
Remarks
The possible values for the InterpolationMode parameter are those available in the InterpolationMode system enum:
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. |