Back to Adaptive Vision Library Lite website
You are here: Start » Image Spatial Transforms » ResizeImage
![](../../img/icon\Resize.png)
ResizeImage
Enlarges or shrinks an image to new dimensions.
Syntax
void avl::ResizeImage ( const avl::Image& inImage, atl::Optional<int> inNewWidth, atl::Optional<int> inNewHeight, avl::ResizeMethod::Type inResizeMethod, avl::Image& outImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | Input image | ||
![]() |
inNewWidth | Optional<int> | 1 - 65536 | NIL | |
![]() |
inNewHeight | Optional<int> | 1 - 65536 | NIL | |
![]() |
inResizeMethod | ResizeMethod::Type | |||
![]() |
outImage | Image& | Output image |
Description
The operation stretches or shrinks the inImage so that the dimensions of the outImage equal inNewWidth, inNewHeight. Three modes of pixel interpolation are available, with Area mode giving best results, but being most computationally expensive.
Examples
![]() |
![]() |
ResizeImage performed on the sample image with inNewWidth = 300, inNewHeight = 200.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
Error type | Description |
---|---|
DomainError | Input and output images are not distinct in ResizeImage. |
DomainError | Output image is too big in ResizeImage. |
DomainError | Empty image on input in ResizeImage. |
See Also
- ResizeImage_Relative – Resizes an image by a factor along each axis.