Saturday, May 23, 2020

Draw Bitmap Images using emWin

Hello Everyone, in this blog post, I will show you the step by step instructions to display a simple bitmap image on the display. I hope you guys have already read the first tutorial of this series, if not click here to read that post.
Bitmap Displayed on emWin simulation
There are three steps which we need to follow:
* Select the bitmap images based on the display type.
* Convert the bitmap images into *.c source code using emWin Bitmap converter tool.
* Use emWin API's to display Bitmap images on the Graphical displays.

Please have a look at the following video.

Once the images are selected, use the "Bitmap Converter Tool" provided by Segger (available with emWin simulation for free), to load the image, and then save the file with extension as *.c filetype.
Bitmap Converter Tool
Add these generated *.c files into the Code::Blocks project, as shown below.
Add image files into the Code::Block Projects
Now, use the emWin API "GUI_DrawBitmap", to display the bitmaps on the Graphical Display. In our example we have generate the *.c code for three images and there names are "bmimage01", "bmimage04" and "bmSTLogo".
Use the following piece of code to update the display.

Thanks for reading this blog post, in case you have some question please post your comment here. This is just a starting and my target is to use the STM32F7 display and emWin to do some cool projects.

No comments:

Post a Comment