05-26-2008, 3:55
|
MaJic
Joined on 05-26-2008
Posts 2
|
L_LoadMemory success but no image displayed
|
 
 
|
|
|
Hi,
I have the below C++ code for L_LoadMemory using LeadTools Mobile Imaging v14.5. The function is trying to load a JPEG file from memory and it returns SUCCESS. However, no image is seen on the display. Did I miss something out?
Also I notice that the databuffer contents is entirely changed after L_LoadMemory is executed. Is it suppose to be so?
bool FPPicture::SetDisplayFromMemory(byte *databuffer, size_t databuffer_size) { int nRet = L_LoadMemory(databuffer, &m_Bitmap,sizeof(BITMAPHANDLE), 0, ORDER_BGRORGRAY, LOADFILE_STORE | LOADFILE_ALLOCATE | LOADFILE_COMPRESSED, NULL, NULL, databuffer_size, NULL, NULL);
if (nRet!=SUCCESS) { CString msg; msg.Format(_T("Error: %d"),nRet); MessageBox(msg, L"SetDisplayFromMemory"); return false; }
return true; }
|
|
|
|
|
Report
|
|
|
|