can jpeg display in emulator in callback function? | developer.brewmp.com can jpeg display in emulator in callback function? | developer.brewmp.com

Developer

can jpeg display in emulator in callback function?

Forums:

can jpeg display in emulator in callback function?

Yes, We can. Use IImage_Notify and write a callback function for that. Then Display the jpeg inside the callback.

Yes, We can. Use IImage_Notify and write a callback function for that. Then Display the jpeg inside the callback.

I did
IMEMASTREAM_Set(pApp->m_pMemStreamcontent,pApp->contentbuff,pApp->contentbuffsize,0, FALSE);
IIMAGE_SetStream(pApp->wallpaper,(IAStream*)pApp->m_pMemStreamcontent);
IIMAGE_Notify(pApp->wallpaper, (PFNIMAGEINFO)Image_callback, (void *)pApp);
static void Image_callback(void *p, IImage *wallp, AEEImageInfo *pi, int nErr){
vzwucat *pApp = (vzwucat*)p;
IDISPLAY_ClearScreen (pApp->m_pIDisplay);
IIMAGE_Draw(wallp, 0, 0);
IDISPLAY_Update (pApp->a.m_pIDisplay);
}
it did not show

I did
IMEMASTREAM_Set(pApp->m_pMemStreamcontent,pApp->contentbuff,pApp->contentbuffsize,0, FALSE);
IIMAGE_SetStream(pApp->wallpaper,(IAStream*)pApp->m_pMemStreamcontent);
IIMAGE_Notify(pApp->wallpaper, (PFNIMAGEINFO)Image_callback, (void *)pApp);
static void Image_callback(void *p, IImage *wallp, AEEImageInfo *pi, int nErr){
vzwucat *pApp = (vzwucat*)p;
IDISPLAY_ClearScreen (pApp->m_pIDisplay);
IIMAGE_Draw(wallp, 0, 0);
IDISPLAY_Update (pApp->a.m_pIDisplay);
}
it did not show

morningai wrote:I did
IMEMASTREAM_Set(pApp->m_pMemStreamcontent,pApp->contentbuff,pApp->contentbuffsize,0, FALSE);
IIMAGE_SetStream(pApp->wallpaper,(IAStream*)pApp->m_pMemStreamcontent);
IIMAGE_Notify(pApp->wallpaper, (PFNIMAGEINFO)Image_callback, (void *)pApp);
static void Image_callback(void *p, IImage *wallp, AEEImageInfo *pi, int nErr){
vzwucat *pApp = (vzwucat*)p;
IDISPLAY_ClearScreen (pApp->m_pIDisplay);
IIMAGE_Draw(wallp, 0, 0);
IDISPLAY_Update (pApp->a.m_pIDisplay);
}
it did not show
Hi,
You do not need to use IMEMASTREAM_Set when you are using IIMAGE_SetStream. Before that you can use ISOURCEUTIL_AStreamFromSource to get the Image source from IAStream interface.
I displayed a JPEG image in the emulator and in device in this manner. Hope it will help.
:)

morningai wrote:I did
IMEMASTREAM_Set(pApp->m_pMemStreamcontent,pApp->contentbuff,pApp->contentbuffsize,0, FALSE);
IIMAGE_SetStream(pApp->wallpaper,(IAStream*)pApp->m_pMemStreamcontent);
IIMAGE_Notify(pApp->wallpaper, (PFNIMAGEINFO)Image_callback, (void *)pApp);
static void Image_callback(void *p, IImage *wallp, AEEImageInfo *pi, int nErr){
vzwucat *pApp = (vzwucat*)p;
IDISPLAY_ClearScreen (pApp->m_pIDisplay);
IIMAGE_Draw(wallp, 0, 0);
IDISPLAY_Update (pApp->a.m_pIDisplay);
}
it did not show
Hi,
You do not need to use IMEMASTREAM_Set when you are using IIMAGE_SetStream. Before that you can use ISOURCEUTIL_AStreamFromSource to get the Image source from IAStream interface.
I displayed a JPEG image in the emulator and in device in this manner. Hope it will help.
:)