I wanted a nice splash screen for my project. I wanted to test the bitmap capabilities of the emWin driver, because I can see that it allows bitmaps to be displayed.
There is a Segger emWin Bitmap Converter, but there are some issue with it.
(1) It is Windows-only, and I am running my setup on Linux.
(2) It is a demo version, which shows a demo watermark.
As a hobbyist, I cannot afford the full version of the Bitmap Converter, hence I tried to derive the bitmap format myself and create an open-source cross platform using a Python script.
I referred to these sources which show how emWin bitmaps C files are generated.
- https://github.com/OpenNuvoton/NUC126BSP/blob/master/Library/NuEdu/emWin/tslib/nuvoton_logo.c
- http://www.pixfonter.net/bitmap-converter/user-manual/image-emwin.html
- https://github.com/STMicroelectronics/STM32CubeL4/blob/master/Projects/32L4R9IDISCOVERY/Demonstrations/STemWin/Gui/Core/power_measurement/generated/slide/arrow_right_gray.c
From here, I can understand that I can have different formats of color encoding (for example, ARGB888, RGB565). The emWin LCD driver is very powerful too as it supports color palettes to compress bitmaps to a smaller size.
I implemented these into my python script. https://github.com/zst123/Project_Fimble/tree/master/emWin-Converter/
Here's the result from my work today.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.