cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 LCD and Images

stone
Associate II
Posted on November 14, 2014 at 03:46

Hello everyone

Can someone explain to me in detail how to display an image on the touch screen? I have been looking for some kind of tutorial but I can't find any. I've been looking at the LCD_WriteBMP command, but so far I haven't been able to get it to do anything. Can anyone show me the procedure to go about displaying the image of my choosing on the screen?

I'm currently using the touch screen peripheral example from ST. I've been able to edit the code to draw my own shapes and lines, and also print my own strings. Now I just want to put some images on the screen
3 REPLIES 3
Posted on November 14, 2014 at 14:07

You'll probably want to create a suitable 16-bit BMP using Photoshop or GIMP. The colour space is not one Microsoft uses, so a lot of more general tools won't help.

Once you have the graphic you can create a .H file using tools like BMPCVT to dump the hex codes for the image.

STM32F429I-Discovery_FW_V1.0.1\Libraries\STemWinLibrary522_4x9i\Software\BmpCvt.exe

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/How%20to%20replace%20icon%20on%20STM32%20Demonstartion%20Builder&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=134]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FHow%20to%20replace%20icon%20on%20STM32%20Demonstartion%20Builder&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=134
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
stone
Associate II
Posted on November 15, 2014 at 23:28

Ok I'll try that.

As for LCD_WriteBMP(uint32_t BmpAddress) function, the comments state:

  * @brief  Displays a bitmap picture loaded in the internal Flash.

  * @param  BmpAddress: Bmp picture address in the internal Flash.

  * @retval None 

When they say bitmap picture, they're referring to an array of data for each pixel correct? Or does this mean I can include a .bmp image in my project and that will work?

stone
Associate II
Posted on November 16, 2014 at 04:49

Figured it out. For anyone else who wants to know how to display any image they want on the STM32F429 Discovery, just follow Clive's link and then download the software specified by Neil in that thread. The Embedded Resource Editor by ST there works really good for converting images to data arrays. Simply convert your image into a c array, and save it as a text document c file. Add that file to your project, then use LCD_WriteBMP(&arrayName). Voila you have an image on the screen. Make sure you format it to the right size before you convert.