Hello,
to display bitmaps from SD card I use the drawing function
with the import function
My color order is RGB.
On the screen the bitmaps are shown with red and blue swapped.
On a PC the colors the same bmp files are displayed correctly.
It looks like the saved bitmaps are coded RGB but GUI_BMP_DrawEx() expects BGR. How can this problem be solved?
Regards
Jan
to display bitmaps from SD card I use the drawing function
with the import function
Source Code
- int APP_GetData(void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Offs)
- {
- UINT NumBytesRead;
- U8 _acBuffer[2 * XSIZE_PHYS]; /*buffer must hold at least one line (2 byte * 800 pix)*/
- f_lseek((FIL *)p, Offs); /*set file pointer to the offset location*/
- f_read((FIL *)p, (void *)_acBuffer, NumBytesReq, &NumBytesRead); /*read data into buffer*/
- *ppData = (const U8 *)_acBuffer; /*data pointer = beginning of the buffer*/
- return (NumBytesRead); /*return number of read bytes*/
- }
On the screen the bitmaps are shown with red and blue swapped.
On a PC the colors the same bmp files are displayed correctly.
It looks like the saved bitmaps are coded RGB but GUI_BMP_DrawEx() expects BGR. How can this problem be solved?
Regards
Jan