View Single Post
  #1  
Old 14-10-2011, 13:01
jawad220
Guest
 
Posts: n/a
Default Resize an image.

C/C++ Declaration
BOOL is5_ResizeImage(BYTE * pImgSrc, UINT32 uWidth, UINT32 uHeight, UINT32 uInRowStride, BYTE *pImgDest, UINT32 uOutWidth, UINT32 uOutHeight, UINT32 uOutRowStride, UINT32 uComponentsPerPixel, UINT32 uMode, UINT32 uFlags);

DO NOT use this on images that require a palette
unless the palette is arranged so that the visual
distance between two colors is directly proportional
to the distance between their color indecies, for all
combinations of colors in the palette.

See ISTypes.h for C/C++ #defines for these resize modes.

Note:
These are the various resizing algorithms:

Mode Name Notes
0 box filter
1 triangle filter
2 Hamming filter
3 Gaussian filter min dimension : 2
4 bell filter min dimension : 2
5 B-spline filter min dimension : 2
6 cubic 1 filter min dimension : 2
7 cubic 2 filter min dimension : 2
8 Lanczos3 filter min dimension : 3
9 Mitchell filter min dimension : 2
10 sinc filter min dimension : 4
11 Hermite filter
12 Hanning filter
13 Catrom filter min dimension : 2
14 area-average (fast) Reduction only
15 area-average Reduction only
16 bi-linear interpolation
17 bi-cubic interpolation
18 nearest neighbor very fast

In general, modes 14 and up are faster than modes 0 through 13.

Note:
All modes except #18 have multithreaded processing options. See uFlags.

Note:
Only modes 14 and up are available for 16 bpc.

Note:
pImgIn != pImgOut
Reply With Quote