This method changes the size of a raster image.

[C++Builder]   [ bool = ]imagekitcontrolname->Effect->Resize(int AWidth, int AHeight, bool Mode)
[Delphi]   [ Boolean = ]imagekitcontrolname.Effect.Resize(AWidth, AHeight: Integer; Mode: Boolean)

Parameters

Name Explanation
AWidth The width of the new image (in pixels)
AHeight The height of the new image (in pixels)
Mode Sets whether Interpolation is used. (False: does not interpolate, True: interpolates).

When enlarging the image, the linear interpolation method is used, when reducing the image, the average method is used. The interpolation can be used for 8 bit grayscale, 16, 24, and 32 bit images.

Return Value

Returns True if successful, otherwise returns False.

Explanation

The Resize method changes the size of the original image to the size specified. When the Mode parameter is false (No interpolation) then changes in size can adversely affect the quality of the Image.

To execute the Resize method, set the image handle of the image in the ImageHandle property or the Layer(LayerNo).ImageHandle property. The Resize method supports 1, 4, 8, 16, 24, and 32 bit color images. If using mask image, set the image handle into the MaskImageHandle property.

If successful the resulting raster image data is set in the LayerNo property (the ImageHandle property or the Layer(LayerNo).ImageHandle property). If the MaskImageHandle property contains a valid image handle, then the resulting mask image will be set in the MaskImageHandle property. If unsuccessful, 0 is returned.

When the Caption, Message, and ButtonName properties are blank, the progress dialog box will not be displayed. When the progress dialog box is displayed, the percentage that the processing has completed will be shown in the dialog box.

The ImageKit10 VCL is a product created by Newtone Corporation