PNG file on the LG phone
Hi Manager.
Firstly my English is very poor. but I will understand your any messages.
Excuse me, I ask you onething.
Now I've made brew program.
It doesn't display png in my program.
There is my code in below.
void user_call(IMemAStream *pMS, IImage*pImage, AEEImageInfo* info, int nErr)
{
IMEMASTREAM_Release( pMS );
IDisplay *m_pIDisplay = ((AEEApplet*)(GET_APP_INSTANCE()))->m_pIDisplay;
IIMAGE_Draw(pImage, (240 - info->cx)/2, (290-info->cy)/2);
IDISPLAY_Update(m_pIDisplay);
}
void LoadImageFromMemory(IImage **pImage, byte *data, uint16 size, int strm)
{
IMemAStream *pMS;
IShell *pSh = ((AEEApplet*)(GET_APP_INSTANCE()))->m_pIShell;
ISHELL_CreateInstance( pSh, AEECLSID_PNG, (void**)pImage );
if( pImage == NULL || *pImage == NULL)
return;
ISHELL_CreateInstance( pSh, AEECLSID_MEMASTREAM, (void**)&pMS );
if( pMS == NULL )
{
IIMAGE_Release( *pImage );
return;
}
IMEMASTREAM_Set( pMS, (byte*)data, size, 0, 0 );
IHeap *heap;
ISHELL_CreateInstance(pSh, AEECLSID_HEAP, (void**)&heap);
if(IHEAP_CheckAvail(heap, 40*1024)) {
IIMAGE_Notify(*pImage, (PFNIMAGEINFO)user_call,(void*)pMS);
IIMAGE_SetStream( *pImage, (IAStream*)pMS );
}
IHEAP_Release(heap);
return;
}
My phone is LG kv755.
Help me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement