AnsweredAssumed Answered

Issue of changing eGUI background picture,need help.

Question asked by Jianwu Tong on Jun 1, 2015
Latest reply on Jun 10, 2015 by Jianwu Tong

Hello everyone!

 

          now,I use eGUI and want to change the background picture of the screen. A problem occur.

 

          My hardware:  MCU MK60VLQ512DN

                                 color LCD ,160X128 ,16bit/pixel RGB 565

          software:         MQX4.1.1

                                 eGUI 3.0

 

          Following is portion code,

 

/* Compression ratio: 39% */
const Byte icon_fsl[] = {


/* Bitmap dimension (W x H) */
0x00, 0x18, 0x00, 0x18,


/* Color mode */
0x80, 0x05,

/* Data */
0xFF, 0xFF, 0x39, 0xF6, 0xF6, 0x00, 0xF7, 0xFF, 0xFF, 0x11, 0xFA, 0xF1, 0xEC, 0xEC, 0x01, 0xF7,
0xFF, 0xFF, 0x0F, 0xF6, 0xEC, 0xEC, 0x01, 0xF1, 0xFF, 0xFF, 0x00, 0xFE, 0xFE, 0x00, 0xFF, 0xFF,
0x0E, 0xF6, 0xF1, 0xFA, 0xFF, 0xFF, 0x00, 0xFE, 0xFE, 0x02, 0xFF, 0xFF, 0x10, 0xFE, 0xFE, 0x03,
0xFF, 0xFF, 0x00, 0xFA, 0xF6, 0xF7, 0xFF, 0xFF, 0x0D, 0xFE, 0xFE, 0x00, 0xFF, 0xFF, 0x00, 0xF7,
0xF1, 0xEC, 0xEC, 0x01, 0xFA, 0xFF, 0xFF, 0x0F, 0xF6, 0xEC, 0xEC, 0x01, 0xF1, 0xFA, 0xFF, 0xFF,
0x11, 0xF6, 0xF1, 0xF6, 0xFF, 0xFF, 0x0F, 0xFE, 0xFE, 0x01, 0xFF, 0xFF, 0x11, 0xFE, 0xFE, 0x03,
0xFF, 0xFF, 0x10, 0xFE, 0xFE, 0x02, 0xFF, 0xFF, 0x00, 0xF7, 0xF1, 0xF1, 0x00, 0xF6, 0xFF, 0xFF,
0x09, 0xFA, 0xF6, 0xFF, 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0x00, 0xF6, 0xEC, 0xEC, 0x01, 0xF1, 0xF7,
0xFF, 0xFF, 0x06, 0xF7, 0xF1, 0xEC, 0xEC, 0x00, 0xF1, 0xF7, 0xFF, 0xFF, 0x01, 0xF6, 0xEC, 0xEC,
0x00, 0xF1, 0xF6, 0xFF, 0xFF, 0x07, 0xF6, 0xEC, 0xEC, 0x01, 0xF1, 0xFA, 0xFF, 0xFF, 0x00, 0xFE,
0xFF, 0xFF, 0x01, 0xF6, 0xFF, 0xFF, 0x09, 0xF7, 0xF1, 0xF1, 0x00, 0xF6, 0xFF, 0xFF, 0x00, 0xFE,
0xFE, 0x02, 0xFF, 0xFF, 0x10, 0xFE, 0xFE, 0x04, 0xFF, 0xFF, 0x11, 0xFE, 0xFE, 0x01, 0xFF, 0xFF,
0x0E, 0xF7, 0xF1, 0xF1, 0x00, 0xF6, 0xFF, 0xFF, 0x11, 0xF6, 0xEC, 0xEC, 0x01, 0xF1, 0xF7, 0xFF,
0xFF, 0x0F, 0xF1, 0xEC, 0xEC, 0x00, 0xF1, 0xF6, 0xFF, 0xFF, 0x12, 0xFA, 0xF6, 0xFF, 0xFF, 0x29
};

 

          what the color mode stand for ? this little log can normally  display on the screen.

 

          I use the freescale converter create one array for my background picture.

/* D4D array declaration */
const D4D_IMG_HEADER_2_D4DINT _5226220;
const Word _5226220_data[];
/* End of D4D array declaration - DO NOT MODIFY */


/* D4D bitmap definition */
D4D_DECLARE_BMP(bmp__5226220, &_5226220, NULL)
/* End of D4D bitmap definition - DO NOT MODIFY */


/* Format: name, bitmap dimension (W x H), color mode, pointer to data */
D4D_DECLARE_IMG_HEADER_2_D4DINT (_5226220, 160, 128, 0x8000, _5226220_data)

const Word _5226220_data[] = {


/* Data */
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0840, 0x1060, 0x1060, 0x1060, 0x0840, 0x0800, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0820, 0x0840, 0x0840, 0x0840, 0x0820, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0840, 0x1080, 0x18C0, 0x20E1, 0x2102, 0x2102, 0x20E1, 0x18C1, 0x18A0, 0x18A0, 0x18A0, 
0x18A0, 0x18C0, 0x18C1, 0x20C1, 0x28E1, 0x2902, 0x2902, 0x2902, 0x20E1, 0x20C1, 0x18A0, 0x1060, 0x0840, 0x0820, 0x0800, 0x0800, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0820, 0x0840, 0x0860, 0x0860, 0x0860, 0x0840, 0x0840, 0x0840, 0x0820, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0820, 0x0840, 0x0840, 0x0840, 0x0020, 0x0020, 0x0020, 0x0020, 
0x0020, 0x0020, 0x0020, 0x0020, 0x0040, 0x0840, 0x0840, 0x0840, 0x0840, 0x0040, 0x0040, 0x0040, 0x0040, 0x0840, 0x0840, 0x0840, 
0x0840, 0x0020, 0x0020, 0x0000, 0x0000, 0x0000, 0x0020, 0x0840, 0x0840, 0x0860, 0x1081, 0x18A1, 0x18A1, 0x18A1, 0x1081, 0x1060, 
0x0860, 0x0840, 0x0840, 0x0860, 0x0860, 0x1060, 0x1081, 0x1081, 0x1081, 0x1060, 0x1060, 0x0860, 0x0840, 0x0840, 0x0820, 0x0020, 
0x0020, 0x0020, 0x0020, 0x0820, 0x0840, 0x1080, 0x10A1, 0x20E1, 0x2122, 0x2942, 0x2942, 0x2122, 0x20E2, 0x18C1, 0x18C1, 0x18C1, 
0x18C1, 0x20C1, 0x20E2, 0x20E2, 0x2902, 0x2922, 0x2922, 0x3142, 0x2922, 0x20E2, 0x20C1, 0x18A1, 0x1081, 0x1060, 0x1060, 0x0840, 
0x0840, 0x0840, 0x0840, 0x0840, 0x0840, 0x0840, 0x0840, 0x0840, 0x0840, 0x0860, 0x0860, 0x0860, 0x0840, 0x0840, 0x0840, 0x0840, 
0x0840, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0840, 0x0840, 0x0840, 0x0820, 0x0820, 0x0820, 0x0840, 
0x0840, 0x0840, 0x0840, 0x0840, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 
0x0000, 0x0020, 0x0020, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0040, 0x0040, 0x0840, 0x0020, 0x0020, 0x0020, 0x0020, 
0x0020, 0x0020, 0x0020, 0x0040, 0x0840, 0x0040, 0x0040, 0x0040, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0040, 
0x0020, 0x0020, 0x0020, 0x0000, 0x0000, 0x0020, 0x0020, 0x0840, 0x0840, 0x1060, 0x1081, 0x18A1, 0x18A1, 0x18A1, 0x18A1, 0x1081, 

 

     then I use the bmp as my background picture.

 

 

D4D_DECLARE_STD_PICTURE(background,0,0, 160, 128, &bmp__5226220)

// Standard screen declaration
D4D_DECLARE_STD_SCREEN_BEGIN(screen_entry, ScreenEntry_)
  D4D_DECLARE_SCREEN_OBJECT(background)
D4D_DECLARE_SCREEN_END()   

 

     but it doesn't work.

 

     Can anyone give me some addvice to solve this?

 

     Thanks!

 

Best Regards

 

JW

Outcomes