emwin how display bmp file from Sd_Card ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

emwin how display bmp file from Sd_Card ?

2,198 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mori_64 on Tue Jul 01 22:57:15 MST 2014
Hello friends

How can i display a bmp file from sd_card in emwin ?
I Have tried "GUI_BMP_Draw" But i wasn't successful .


Thank
Labels (1)
0 Kudos
Reply
2 Replies

1,676 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Jul 03 08:32:00 MST 2014
Hi Mori_64,
I did not check your code but segger has sample example here
http://www.segger.com/admin/uploads/userfiles/file/emWin/tutorials/src/2DGL_DrawBMP.c

0 Kudos
Reply

1,678 Views
lpcware
NXP Employee
NXP Employee
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 .
0 Kudos
Reply