Re: .Bmp to LCD ??
Posted: Tue Feb 28, 2012 12:14 am
Hi,
I just wrote that piece of code and it counts ok, the first few numbers were in colour then 6 and 7 were white, then 8 onwards is just black characters.
Does this help?
/*Macro_SetForeColor_Start*/
#if MX_GCXLCD_TYPE == 1
if (Red > 0x3F)
Red = 0x3F;
if (Green > 0x1F)
Green = 0x1F;
if (Blue > 0x1F)
Blue = 0x1F;
GFX_Fore_Color = Green | (Red << 5);
GFX_Fore_Color = GFX_Fore_Color | (Blue << 11);
#else
if (Red > 7)
Red = 7;
if (Green > 7)
Green = 7;
if (Blue > 3)
Blue = 3;
Green = Green << 2;
Red = Red << 5;
GFX_Fore_Color = (Blue | Red) | Green;
#endif
/*Macro_SetForeColor_End*/
When i use the set_forecolour macro i use 3 numbers between 0 and 255 to set the colour.
That suggests to me that the numbers leaving the memory card need to be between 0 and 255, i think that as its 16bit data from the memory card its going to be a bigger number than 255, so the glcd software cant handle it.
I just wrote that piece of code and it counts ok, the first few numbers were in colour then 6 and 7 were white, then 8 onwards is just black characters.
Does this help?
/*Macro_SetForeColor_Start*/
#if MX_GCXLCD_TYPE == 1
if (Red > 0x3F)
Red = 0x3F;
if (Green > 0x1F)
Green = 0x1F;
if (Blue > 0x1F)
Blue = 0x1F;
GFX_Fore_Color = Green | (Red << 5);
GFX_Fore_Color = GFX_Fore_Color | (Blue << 11);
#else
if (Red > 7)
Red = 7;
if (Green > 7)
Green = 7;
if (Blue > 3)
Blue = 3;
Green = Green << 2;
Red = Red << 5;
GFX_Fore_Color = (Blue | Red) | Green;
#endif
/*Macro_SetForeColor_End*/
When i use the set_forecolour macro i use 3 numbers between 0 and 255 to set the colour.
That suggests to me that the numbers leaving the memory card need to be between 0 and 255, i think that as its 16bit data from the memory card its going to be a bigger number than 255, so the glcd software cant handle it.