2016-12-15 11:41 PM
I tried to use the project at C:\Users\xxx\STM32Cube\Repository\STM32Cube_FW_F7_V1.5.1\Projects\STM32746G-Discovery\Examples\BSP\Inc with Atollic IDE. With some efforts i was able to compile and debug. All was ok.
Then i used our company logo, transformed from BMP to .h instead of stlogo.h, but the resulting picture was a trapezoid one...
After some tests i found the following bug:
stlogo.h:
- line 45: change entry 3 from 0x50 to 0x4F
stm32746g_discovery_lcd.c:
- line 1060: pbmp += (index + ((width + 1) * (height - 1) * (bit_pixel/8)));
- line 1070: pbmp -= (width + 1)*(bit_pixel/8);With this change you can use standard BMP data from Windows bitmap files.
2016-12-16 07:20 AM
Hi
hittinger.stefan
,First, thanks for the feedback and contribution.
Just to make things more clear, I have a question: when you tried
with Atollic IDE using stlogo.h, did that work ok or after the change of line 45 ? and the change number 2 in the Lcd file is necessary even when using stlogo.h ?
Thanks in advance,
-Walid F-
2017-01-02 04:11 AM
Hi Walid,
sorry for my late answer, is was on holidays until now...
I had to change both values. If i only change line 45, the default stlogo also was trapezoid (each new line starts 1 pixel earlier than the previous). Only with both changes, stlogo and other bmp are shown correctly.
2017-01-10 09:24 AM
Hello
Hittinger.Stefan
, I have checked this case with same board and example and I cannot reproduce this issue. Could you please provide a screenshot of the resulting picture trapezoid that you have.Best Regards
Imen
2017-01-11 05:36 AM
Hello Imen,
if you take the original files, all looks fine. if you use another logo instead of stlogo.h you will see the trapezoid version of this new logo. The changes allow you to see both, stlogo and external generated logo, in correct manner.
Take any .bmp. convert it to hex. replace the code within stlogo.h by the new generated code. Translate and see...
One other issue can produce this error: the Hex-converter i used. It is called HexConverter.exe from
How do you convert bmp files?
Best regards
Stefan
2017-01-11 08:27 AM
Hi
Hittinger.Stefan
,Thank you for posting yourfinding. I will check this case.
I recommend to review the BmpCvt.exe '
https://www.segger.com/emwin-bitmap-converter.html
' for emWin that you find in the STemwin package(STemWin_Library_V1.1.2\Libraries\STemWinLibrary522\Software)forconverting image formats like bmp andrefer to the emwin user manual in Chapter 10 Bitmap Converter.Regards
Imen
2017-01-12 12:58 AM
Hello Imen,
i read the format description of the bmp file format and checked stlogo an my own logo. Both have the correct values for dimension, color ... So they seemed to be ok.
The difference between the 2 bmp is the line size: stlogo 80, my logo 115
I changed my logo so i get a line length of 116 and used the original display routine.
Now my logo and stlogo looked ok.
It seems to be a problem with the line width, even number or uneven.
Best regards
Stefan