imaqResample
Usage
int imaqResample(Image* dest, const Image* source, int newWidth, int newHeight, InterpolationMethod method, Rect rect);
Purpose
Resizes an image to a given resolution. The source image and destination image must be the same image type. After execution, the size of the destination image is newWidth x newHeight. For fast zero-order scaling, use imaqScale().
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL
Parameters
|
Name
|
Type
|
Description
|
|---|---|---|
| dest | Image* | The image into which the function places the resampled data. The image may be the same as source. |
| source | const Image* | The image to resample. |
| newWidth | int | The width of the resampled area. |
| newHeight | int | The height of the resampled area. |
| method | InterpolationMethod | The method of interpolation. |
| rect | Rect | Specifies an area of the source image to resample. Set this parameter to IMAQ_NO_RECT to resample the entire image. |
Return Value
| Type |
Description |
|---|---|
| int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |