Quantcast
Channel: Intel® Software - Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1489

image resize for color image size limitation

$
0
0

Hi, All:

           I am resize the large image (width 35776, height 34880) to smaller image (width 8000, height 7800) for display. For mono image, it is working perfectly, but for color image with depth is 24 bit per pixel ~ 3 byte per pixel of the same image size, in which i just overlay a color layer, only upper part can be resized successfully; the low part looks wrong.

 

          I have also dump the Top left part and bottom right part of the original color image buffer, the image is OK. So the remaining doubt is about whether there is any limitation on the image resizing

Mono resize image: Refer to the Mono_intel in the attachment

Color resize image: Refer to the Color_intel in the attachment

 

Here comes the code on the resizing.

//spec init with the corresponding init buffer

m_status = ippiResizeGetSize_8u( expRoiSize, dstRoiSize, ippLinear, nAntiAlias, &szSpec, &szInit );//0 : no anti-alias, 1 : with anti alias

pSpec = (IppiResizeSpec_32f*)ippsMalloc_8u( szSpec );

m_status = ippiResizeLinearInit_8u( expRoiSize, dstRoiSize, pSpec );

 

//working buffer init and resize

m_status = ippiResizeGetBufferSize_8u( pSpec, dstRoiSize, nSrcBytePerPixel, &szWork );

pBufWork = ippsMalloc_8u( szWork );

switch(nSrcBytePerPixel)

{

case 1:

m_status = ippiResizeLinear_8u_C1R( pExp, nExpPitch, pDst, nDPitch, dstOffset, dstRoiSize, borderType, 0, pSpec, pBufWork );

break;

case 3:

m_status = ippiResizeLinear_8u_C3R( pExp, nExpPitch, pDst, nDPitch, dstOffset, dstRoiSize, borderType, 0, pSpec, pBufWork );

break;

case 4:

m_status = ippiResizeLinear_8u_C4R( pExp, nExpPitch, pDst, nDPitch, dstOffset, dstRoiSize, borderType, 0, pSpec, pBufWork );

break;

}

 

Please help to advise on what can be changed to overcome the issue. Thank you!

 

Best Regards

Edwin Zeng

AttachmentSize
Downloadimage/pngColor_intel.png446.06 KB
Downloadimage/pngMono_intel.PNG763.9 KB

Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>