Hi,
Currently I'm using LPC54628 development board and trying to display any image (BMP in general). I have 32x32 bmp image converted to C file. This is code generated from Bitmap Converter.
Display All
I' d like to simply display it using:
But this function always returns 1 and of course nothing is displayed. I don't know where the problem is. Any other emwin features work like a charm - only images displaying fails. Maybe it's a problem with pallete or something? Maybe should I convert it to other format?
Best regards!
Currently I'm using LPC54628 development board and trying to display any image (BMP in general). I have 32x32 bmp image converted to C file. This is code generated from Bitmap Converter.
C Source Code
- static GUI_CONST_STORAGE unsigned short _acface[] = {
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0377, 0x0478, 0x0478, 0x0478, 0x0478, 0x0478, 0x0477, 0x0377, 0x0367, 0x0366, 0x0156, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0799, 0x0EDE, 0x0EDF, 0x0EDF, 0x0EDF, 0x0EDF, 0x0ECF, 0x0ECF, 0x0EBF, 0x0DBF, 0x0DAF, 0x099A, 0x0156, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0789, 0x0EEE, 0x0FEF, 0x0FEF, 0x0FEF, 0x0EDF, 0x0EDF, 0x0ECF, 0x0ECF, 0x0EBF, 0x0DBF, 0x0DAF, 0x0DAF, 0x0889, 0x0156, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0799, 0x0EEF, 0x0FFF, 0x0FFF, 0x0FEF, 0x0EEF, 0x0EDF, 0x0ECF, 0x0ECF, 0x0EBF, 0x0DBF, 0x0DAF, 0x0DAF, 0x0D9F, 0x0D9F, 0x098A, 0x0156, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0799, 0x0EEF, 0x0FFF, 0x0FFF, 0x0FFF, 0x0EEF, 0x0EDF, 0x0ECF, 0x0EBF, 0x0DBF, 0x0DBF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0D9F, 0x0D9F, 0x0D9F, 0x0889, 0x0156, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0799, 0x0EEF, 0x0FFF, 0x0FFF, 0x0FFF, 0x0EEF, 0x0ECF, 0x0EBF, 0x0DBF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x098A, 0x0156, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0689, 0x0EEF, 0x0FFF, 0x0FFF, 0x0FFF, 0x0EEF, 0x0ECF, 0x0DBF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0DAF, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x088A, 0x0156, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0789, 0x0EEE, 0x0FFF, 0x0EEE, 0x0BBB, 0x0999, 0x0989, 0x0879, 0x0A8C, 0x0DAF, 0x0DAF, 0x0D9F, 0x0D9F, 0x0C9E, 0x097B, 0x0879, 0x0879, 0x0869, 0x0A7C, 0x0C9F, 0x0C9F, 0x0C9F, 0x0C9F, 0x098A, 0x0156, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0CCD, 0x0EEF, 0x0EDE, 0x0777, 0x0CCC, 0x0EEE, 0x0DDD, 0x0DDD, 0x0A9A, 0x0758, 0x0758, 0x0323, 0x0869, 0x0657, 0x0BBB, 0x0EEE, 0x0DDD, 0x0EEE, 0x0BAB, 0x0758, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C9F, 0x0255, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0DCD, 0x0EEF, 0x0999, 0x0EEE, 0x0FFF, 0x0FFF, 0x0999, 0x0555, 0x0EEE, 0x0CCC, 0x0647, 0x0D9F, 0x0546, 0x0EEE, 0x0CCC, 0x0555, 0x0BBB, 0x0FFF, 0x0FFF, 0x0CCC, 0x096B, 0x0C8F, 0x0C8F, 0x0C8F, 0x0145, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0DCD, 0x0EEF, 0x0989, 0x0FFF, 0x0FFF, 0x0FFF, 0x0BBB, 0x0CCC, 0x0EEE, 0x0EEE, 0x0869, 0x0D9F, 0x0879, 0x0FFF, 0x0DDD, 0x0DDD, 0x0CCC, 0x0FFF, 0x0FFF, 0x0EEE, 0x0859, 0x0C8F, 0x0C7F, 0x0C7F, 0x0145, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0DCD, 0x0EDF, 0x0A9B, 0x0CCC, 0x0FFF, 0x0FFF, 0x0FFF, 0x0FFF, 0x0FFF, 0x0AAA, 0x0B8D, 0x0D9F, 0x097B, 0x0CCC, 0x0FFF, 0x0FFF, 0x0FFF, 0x0FFF, 0x0FFF, 0x0AAA, 0x0B7D, 0x0C7F, 0x0C7F, 0x0C7F, 0x0145, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0CBD, 0x0EDF, 0x0DCE, 0x0878, 0x0DDD, 0x0FFF, 0x0FFF, 0x0FFF, 0x0BBB, 0x087A, 0x0D9F, 0x0D9F, 0x0C9E, 0x0868, 0x0DDD, 0x0FFF, 0x0FFF, 0x0FFF, 0x0BBB, 0x086A, 0x0C8F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0144, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0CBD, 0x0ECF, 0x0ECF, 0x0EBF, 0x097A, 0x0879, 0x0989, 0x0879, 0x0A7C, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x097A, 0x0879, 0x0889, 0x0879, 0x0A7C, 0x0C8F, 0x0C8F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0144, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0CBD, 0x0ECF, 0x0ECF, 0x0DBF, 0x0D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086A, 0x0C8E, 0x0C8F, 0x0859, 0x0313, 0x0C6F, 0x0C6F, 0x0C6F, 0x0C8E, 0x0567, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0256, 0x0BAC, 0x0D9F, 0x0D9F, 0x0A7B, 0x0B7D, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0D9F, 0x0C9F, 0x0C8F, 0x0C8F, 0x0C7F, 0x0B7F, 0x0749, 0x0C6F, 0x0C6F, 0x0B8E, 0x0466, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0366, 0x0BAC, 0x0D9F, 0x0D9F, 0x0D9F, 0x0C9F, 0x0C9F, 0x0C9F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C7F, 0x0C7F, 0x0C6F, 0x0C6F, 0x0C6F, 0x0B8D, 0x0466, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0256, 0x0BAC, 0x0D9F, 0x0C9F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C6F, 0x0C6F, 0x0C6F, 0x0B8D, 0x0456, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0366, 0x0BAC, 0x0C9F, 0x0C8F, 0x0C8F, 0x0C8F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C6F, 0x0C6F, 0x0B8D, 0x0466, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0256, 0x0BAC, 0x0C9F, 0x0C8F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0C7F, 0x0B8E, 0x0456, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0266, 0x098A, 0x096A, 0x086A, 0x085A, 0x085A, 0x085A, 0x085A, 0x085A, 0x085A, 0x086A, 0x0466, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056,
- 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056, 0x0056,
- 0x0056
- };
- GUI_CONST_STORAGE GUI_BITMAP bmface = {
- 32, // xSize
- 32, // ySize
- 64, // BytesPerLine
- 16, // BitsPerPixel
- (unsigned char *)_acface, // Pointer to picture data
- NULL, // Pointer to palette
- GUI_DRAW_BMP444_12
- };
I' d like to simply display it using:
But this function always returns 1 and of course nothing is displayed. I don't know where the problem is. Any other emwin features work like a charm - only images displaying fails. Maybe it's a problem with pallete or something? Maybe should I convert it to other format?
Best regards!