ImageGearJava Project > com.accusoft.imagegear.processing Package > ImGearProcessing Class : resize Method |
This method processes all channels of the image as well as the image's ROI, if it exists.
Interpolation options are ignored when resizing vector images.
Applicability of interpolation options to raster images depend on the color space and bit depth of the image. The following table specifies applicability of interpolation options to different types of raster images.
ImGearInterpolations | Bitonal images | Non-bitonal images |
---|---|---|
NONE | Yes | Yes |
AVERAGE | Only if both new width and height are not smaller than original width and height. | Yes, except indexed images where palette is not grayscale or inverted grayscale. |
BILINEAR | Only if both new width and height are not smaller than original width and height. | Yes, except indexed images where palette is not grayscale or inverted grayscale. |
NEAREST_NEIGHBOR | Yes | Yes |
GRAYSCALE | Only if both new width and height are not greater than original width and height. | No |
PRESERVE_WHITE | Only if both new width and height are not greater than original width and height. | No |
PRESERVE_BLACK | Only if both new width and height are not greater than original width and height. | No |
BICUBIC | No | Yes, except indexed images where palette is not grayscale or inverted grayscale. |
ImGearProcessingVerifier.canApplyResize method can be called to check whether the operation can be performed.
public static void resize( ImGearPage page, int width, int height, ImGearInterpolationOptions options ) |
This method processes all channels of the image as well as the image's ROI, if it exists.
Interpolation options are ignored when resizing vector images.
Applicability of interpolation options to raster images depend on the color space and bit depth of the image. The following table specifies applicability of interpolation options to different types of raster images.
ImGearInterpolations | Bitonal images | Non-bitonal images |
---|---|---|
NONE | Yes | Yes |
AVERAGE | Only if both new width and height are not smaller than original width and height. | Yes, except indexed images where palette is not grayscale or inverted grayscale. |
BILINEAR | Only if both new width and height are not smaller than original width and height. | Yes, except indexed images where palette is not grayscale or inverted grayscale. |
NEAREST_NEIGHBOR | Yes | Yes |
GRAYSCALE | Only if both new width and height are not greater than original width and height. | No |
PRESERVE_WHITE | Only if both new width and height are not greater than original width and height. | No |
PRESERVE_BLACK | Only if both new width and height are not greater than original width and height. | No |
BICUBIC | No | Yes, except indexed images where palette is not grayscale or inverted grayscale. |
ImGearProcessingVerifier.canApplyResize method can be called to check whether the operation can be performed.