Content originally posted in LPCWare by Mori_64 on Wed Jul 02 22:39:05 MST 2014
as described in ewin manual
Gui_BMP_DRAWEx() "need Getdata " function
this is my get_data function :
int APP_GetData(void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off)
{
unsigned int NumBytesRead;
FILE * phFile;
phFile = (FILE *)p;
/* Check buffer size */
if (NumBytesReq > sizeof(_acBuffer)) {
NumBytesReq = sizeof(_acBuffer);
}
/* Set file pointer to the required position */
//fseek(phFile, Off,SEEK_SET);
/* Read data into buffer */
NumBytesRead=fread( &_acBuffer ,sizeof (char),NumBytesReq , phFile);
/* Set data pointer to the beginning of the buffer */
*ppData =(unsigned char *) _acBuffer;
/* Return number of available bytes */
return NumBytesRead;
}
but i can't display image .