ResizeGetSize
Computes the size of the specification structure and the size of the external temporary buffer for the resize transform initialization.
Syntax
Case 1: Processing images of 32-bit sizes
IppStatus ippiResizeGetSize_<mod>(IppiSize
srcSize
, IppiSize
dstSize
, IppiInterpolationType
interpolation
, Ipp32u
antialiasing
, int*
pSpecSize
, int*
pInitBufSize
);
Supported values for
mod
:8u | 16u | 32f | 64f |
IppStatus ippiResizeGetSize_16s(IppiSize
srcSize
, IppiSize
dstSize
, IppiInterpolationType
interpolation
, Ipp32u
antialiasing
, int*
pSpecSize
, Ipp32s*
pInitBufSize
);
Case 2: Processing images with platform-aware functions
IppStatus ippiResizeGetSize_L(IppiSizeL
srcSize
, IppiSizeL
dstSize
, IppDataType
dataType
, IppiInterpolationType
interpolation
, Ipp32u
antialiasing
, IppSizeL*
pSpecSize
, IppSizeL*
pInitBufSize
);
Case 3: Processing images with threading layer (TL) functions
IppStatus ippiResizeGetSize_LT(IppiSizeL
srcSize
, IppiSizeL
dstSize
, IppDataType
dataType
, IppiInterpolationType
interpolation
, Ipp32u
antialiasing
, IppSizeL*
pSpecSize
, IppSizeL*
pInitBufSize
);
Include Files
ippi.h
Flavors with the
_LT
suffix: ippi_tl.h
Flavors with the
_L
suffix: ippi_l.h
Domain Dependencies
Flavors declared in
ippi.h
:Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Flavors declared in
ippi_tl.h
:Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
,
ippi.lib
,
ippcore_tl.lib
,
ippi_tl.lib
Parameters
- srcSize
- Size, in pixels, of the source image.
- dstSize
- Size, in pixels, of the destination image.
- interpolation
- Interpolation method. Supported values:ippNearest,ippLinear,ippCubic,ippLanczos, andippSuper.
- antialiasing
- Supported values: 1- resizing with antialiasing, 0 - resizing without antialiasing.
- dataType
- Data type of the image. Supported values:ipp8u,ipp16u,ipp16s,ipp32f,ipp64f(only for linear interpolation).
- pSpecSize
- Pointer to the size, in bytes, of the specification structure.
- pInitBufSize
- Pointer to the size, in bytes, of the temporary buffer required for initialization of the specification structure.
Description
This function computes the size of the specification structure and the size of the external buffer for the following functions depending on the
interpolation
parameter value: - ippiResizeAntialiasingCubicInit,ippiResizeAntialiasingLanczosInit, orippiResizeAntialiasingLinearInitfor resizing with antialiasing
- ippiResizeNearestInit,ippiResizeLinearInit,ippiResizeCubicInit,ippiResizeLanczosInit, orippiResizeSuperInitfor resizing without antialiasing
Interpolation algorithms have the following filter sizes:
Nearest Neighbor | 1x1 |
Linear | 2x2 |
Cubic | 4x4 |
2-lobed Lanczos | 4x4 |
The
ippiResizeGetSize
function always returns non-zero value for the pInitBufSize
parameter, even if the temporary buffer is not required for the specification structure initialization. The temporary buffer is only required when initializing the specification structure for the following functions: ippiResizeAntialiasingCubic
, ippiResizeAntialiasingLanczos
, ippiResizeAntialiasingLanczos
, ippiResizeLanczos
, and ippiResizeCubic
.Return Values
- ippStsNoErr
- Indicates no error.
- ippStsNullPtrErr
- Indicates an error if one of the specified pointers isNULL.
- ippStsResizeNoOperation
- Indicates an error if width or height of the image is equal to zero.
- ippStsSizeErr
- Indicates an error in the following cases:
- If the source image size is less than the filter size of the chosen interpolation method (exceptippSuper).
- If one of the specified dimensions of the source image is less than the corresponding dimension of the destination image (forippSupermethod only).
- If the width or height of the source or destination image is negative.
- ippStsExceededSizeErr
- Indicates an error in the following cases:
- If at least one of the computed values exceeds the maximum of the data type positive value pointed bypSpecSizeorpInitBufSizecorrespondingly (the size of one of the processed images is too large).
- If width or height of the destination image or the source image exceeds 33554431 (0x1FFFFFF) (only for platform-aware and TL functions).
- ippStsInterpolationErr
- Indicates an error ifinterpolationhas an illegal value.
- ippStsNoAntialising
- Indicates a warning if the specified interpolation method does not support antialiasing.
- ippStsNotSupportedModeErr
- Indicates an error if the requested mode is not supported.
- ippStsDataTypeErr
- Indicates an error ifdataTypehas an illegal value.