2014-11-13 06:46 PM
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 screen2014-11-14 05:07 AM
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¤tviews=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=1342014-11-15 02:28 PM
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?2014-11-15 07:49 PM
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.