2017-06-01 07:26 AM
Exacly how is BSP_LCD_DrawBitmap using data?
I read the text above the function definition and did just as it said. I tried various=every options, but nothing worked. I used a software called Image2Lcd(.exe).
Then someone mentioned a program called bin2header.exe here in this forum. After a bit fine tuning the data, it created a working datafile. But there is no info about how it did it.
Surely, every program is able to do the conversion. But how.
2017-06-01 12:42 PM
It looks like the program Image2Lcd(.exe), I was using, did not work here. Even the start of a bitmap file was wrong, no matter what I tried..
2017-06-01 04:32 PM
I successfully use gimp to create bitmaps in the argb8888 format. im not making them into a header file, but argb8888 is a format that BSP_LCD_DrawBitmap can grok
2017-06-02 09:31 AM
This is interesting. I tried Gimp but the file it produced did not look like correct. There were macros and such. I exported image as header .h.
What settings did you use?
2017-06-02 06:18 PM
I didnt make a header file. I either read the bitmap off a uSD card, usb thumb drive, or qspi flash on the board. the st utilities you found do it right. I really wish they were open source so I could build them on a mac.
2017-06-03 05:03 AM
Yes, reading images from SD card is a good option.
Have you opened the stlogo.h file from for example ...STM32Cube\Repository\STM32Cube_FW_F7_V1.7.0\Projects\STM32746G-Discovery\Examples\BSP\Inc folder? You can do it with basic text editor. It begins like this. (-comments)
#ifndef __STLOGO_H
#define __STLOGO_H
__ALIGN_BEGIN const unsigned char stlogo[9174] __ALIGN_END =
{
0x42,0x4d,0xd6,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,
0x00,0x00,0x50,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x03,0x00,
0x00,0x00,0xa0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,�?�?�?�?�?�?�?�?�?�?�?�?
It is a text file, the 0x42 hexadecimal stuff is directly from Bitmap file. The [9174] can be [], i tried it that way.
I think it would be possible to do the conversion program myself, that is, by anyone.
2017-06-03 09:44 AM
To answer John Doe, There is an SD card holder in the 746 Discovery. I probably have to combine two examples to get that work.
To have bitmaps in the program memomory is easier for me now.