Back to Adaptive Vision Library Lite websiteYou are here:
Start »
Image Spatial Transforms »
ResizeImage_Relative
Header: | AVL.h |
Namespace: | avl |
Resizes an image by a factor along each axis.
Syntax
void avl::ResizeImage_Relative
(
const avl::Image& inImage,
float inHorizontalScale,
float inVerticalScale,
avl::ResizeMethod::Type inResizeMethod,
avl::Image& outImage
)
Parameters
|
Name |
Type |
Range |
Default |
Description |
![](../../img/in.png) |
inImage |
const Image& |
|
|
Input image |
![](../../img/in.png) |
inHorizontalScale |
float |
0.0 - 65536.0 |
1.0f |
|
![](../../img/in.png) |
inVerticalScale |
float |
0.0 - 65536.0 |
1.0f |
|
![](../../img/in.png) |
inResizeMethod |
ResizeMethod::Type |
|
|
|
![](../../img/out.png) |
outImage |
Image& |
|
|
Output image |
Description
The operation stretches or shrinks the inImage so that its dimensions are scaled, accordingly, by the factor of inHorizontalScale, inVerticalScale.
Two modes of pixel interpolation are available, the bilinear filtering being more precise and computationally expensive.
Examples
ResizeImage_Relative performed on the sample image with inHorizontalScale = 0.5, inVerticalScale = 0.25.
See Also
- ResizeImage – Enlarges or shrinks an image to new dimensions.