Skip to main content
Breeze1
Associate III
Mar 6, 2020 1:15 AM UTC
Solved

How to show a picture?

Now I need to download a jpg/png/bmp picture to FLASH, and show it . I do not find touchgfx have anything with that. If I want to use touchgfx, how can I do?

This topic has been closed for replies.
Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
Mar 11, 2020 2:20 PM UTC

You have to use the Bitmap class, either using static image data located somewhere in addressable flash, or using a dynamic bitmap.

/Martin

6 replies

Romain DIELEMAN
ST Employee
Mar 6, 2020 12:30 PM UTC

Hi, when you create a project with TouchGFX designer you can add a .png image easily with the Image widget. See tutorial 1 here to set up a background image. Any image you import can be set the same way.

If this is not what you are looking for, please explain what you wish to do in your project with more details.

Breeze1
Breeze1Author
Associate III
Mar 7, 2020 3:04 AM UTC

Sorry, my fault. I mean I already make the whole program using TouchGFX designer and download the program to my devie. When freeRTOS is already running, I need to download some pictures to FLASH, I want to view pictures with my device.

Martin KJELDSEN
Principal III
Mar 6, 2020 12:37 PM UTC

Depending on your setup, the linker will place your bitmap in internal or external FLASH memory for you and TouchGFX will know the address for that image when you use it with the Bitmap class.

/Martin

Breeze1
Breeze1Author
Associate III
Mar 11, 2020 11:18 AM UTC

If I do not use it with the Bitmap class. How do I do?

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
Mar 11, 2020 2:20 PM UTC

You have to use the Bitmap class, either using static image data located somewhere in addressable flash, or using a dynamic bitmap.

/Martin