Help needed on zoomin app. IGRAPHICS_Stretchblt | developer.brewmp.com Help needed on zoomin app. IGRAPHICS_Stretchblt | developer.brewmp.com

Developer

Help needed on zoomin app. IGRAPHICS_Stretchblt

Forums:

Hi All,

I have to use image zoom-in for the images coming from the server (.png, .jpg, .bmp) in my application. I am trying image resizing using IGRAPHICS_Stretchblt().
For that first i am decoding those image files to bmp using IMAGEDECODER, its fine upto here.

ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&pMe->DeviceInfo);
rc.x = 0;
rc.y = 0;
rc.dx = pMe->DeviceInfo.cxScreen;
rc.dy = pMe->DeviceInfo.cyScreen;

ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_FILEMGR, (void**)&pIFileMgr);
if (IFILEMGR_Test(pIFileMgr, "face.att") != SUCCESS)
{
return FALSE;

pFile = IFILEMGR_OpenFile (pIFileMgr, "face.att", _OFM_READ);
IFILEMGR_GetInfo(pIFileMgr, "face.att", &fi);
szTempData = (char*)MALLOC(fi.dwSize + 1);

size = IFILE_Read (pFile, szTempData, fi.dwSize);

ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_JPEGDECODER, (void**)&pIdec);
IIMAGEDECODER_QueryInterface(pIdec,AEEIID_FORCEFEED,(void**)&pIFrcFd);

IFORCEFEED_Reset(pIFrcFd);
ret = IFORCEFEED_Write(pIFrcFd, (void*)szTempData, size);
ret = IFORCEFEED_Write(pIFrcFd, 0, 0);
//here we get the bitmap for that attachment...yet its correct getting bmp of the images...
ret = IIMAGEDECODER_GetBitmap(pIdec, &pBitMap);

Now, i have to resize that image.
Shall i use IGRAPHICS_Stretchblt( ) for that bitmap as below?

if(ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_GRAPHICS,(void**)&pg) != SUCCESS)
return FALSE;
pRawImage2 = (byte*)pBitMap + (*(byte *)pBitMap); //to get raw bmp with //removing AEE Header

IGRAPHICS_StretchBlt(pg, 0, 0, 179, 210, pRawImage2, AEE_RO_TOTAL);
IGRAPHICS_Update(pg);
IDISPLAY_Update (pMe->a.m_pIDisplay);

Code is executing correctly with no error or warning. But still i am not able to see that image, i am getting blank screen for that.

has anybody gone through these apis and similar application?
is this way is correct to get it, please guide. :mad:
can you please tell with some example code? :mad:

Thanks in advance.
Bhupesh