Problems displaying bitmap in Memory Device

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

Problems displaying bitmap in Memory Device

578 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pcalton on Fri Aug 09 13:13:33 MST 2013
I am experimenting with Memory Devices and I am trying to get text to display on top of a bitmap using the following code:

GUI_Init();
GUI_EnableAlpha(1);
WM_SetCreateFlags(WM_CF_MEMDEV);
hIntro1 = GUI_MEMDEV_CreateFixed(0, 0, 480, 272, GUI_MEMDEV_HASTRANS, GUI_MEMDEV_APILIST_32, GUI_COLOR_CONV_8888);
GUI_MEMDEV_Select(hIntro1);
GUI_SetBkColor(GUI_BLACK);
GUI_Clear();
GUI_DrawBitmap(&bmIntroImage, 0, 1);
GUI_SetFont(GUI_FONT_32B_ASCII);
GUI_SetColor(GUI_DARKRED);
GUI_DispStringHCenterAt("Welcome", 240, 120);
GUI_MEMDEV_CopyToLCD(hIntro1);


The image bmIntroImage was a png file that was converted to a c file using the BmpCvt tool.

If I pass GUI_MEMDEV_NOTRANS to GUI_MEMDEV_CreateFixed then my image is displayed correctly, but the text has a black background.
If I pass GUI_MEMDEV_HASTRANS to GUI_MEMDEV_CreateFixed then my image is tinted yellow and is stretched across the X axis interspersed with black vertical lines.

What am I doing wrong?
Labels (1)
0 Kudos
2 Replies

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by msjustu30 on Fri Dec 13 02:29:12 MST 2013
It is a strange problem that you have described here about the problems displaying bitmap in memory devices. The code was really impressive and please do share more interesting code often as it will be a great help for me to learn something new.
microsoft windows techs
0 Kudos

457 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pcalton on Fri Aug 09 13:16:23 MST 2013
Solved:

The LCD had a different Color Conversion than the Memory Device. Confused as to why things looked ok without the transparency
0 Kudos