ImageGear Professional v18.2 > API Reference Guide > Processing Component API Reference > Processing Component Objects > IGProcessingCtl Control > IGProcessingCtl Methods > ResizeImage Method |
Changes the dimensions of an image, by changing the dimensions of the DIB image bitmap. The image data in the bitmap will be stretched or compressed as necessary, to fit the new dimensions. Use NewWidth and NewHeight to specify the new dimensions.
During re-sizing, new pixel values which previously did not exist in the image, may be introduced due to interpolation. If you want to prevent this, such as to preserve the original number of palette entries used, then set the IGProcessingCtl Control.Interpolation Property to IG_INTERPOLATION_NONE. In this case, only pixel values that occur in the original image will result in the resized image.
If you try to apply some interpolation methods to a 4-bit image, you will receive the error IGE_PROC_INVAL_FOR_BIT_COUNT. If you try to apply some interpolation methods to an 8-bit indexed image you will receive this same error and also IGE_PROC_INVAL_FOR_8BIT_INDEXED.
This method processes all image channels, including Alpha channel and Extra channels, if they exist.
ResizeImage (ByVal pPage As IGPage, ByVal NewWidth As Long,
ByVal NewHeight As Long, ByVal ResizeMode As enumIGResizeModes)
Name | Description |
---|---|
pPage | Reference to IGPage Object. |
NewWidth | Width of the resized image. |
NewHeight | Height of the resized image. |
ResizeMode | Specifies whether new dimensions are actual dimensions or percentages. |
N/A
1, 4, 8, 24, 9-16-bit gray level, 32
Image Processing and Effects