Skip to main content
Andrei Chichak
Lead
Jul 14, 2025 10:59 PM UTC
Solved

Documentation example for dynamic bitmaps seems unlikely to work

I'm reading through the documentation for dynamic bitmaps to figure out what file formats I should use to bring images off of an SD card for display.

I see in:

https://support.touchgfx.com/docs/development/ui-development/scenarios/loading-images-at-runtime

the code reads in a .jpg and uses the attached BMPFileLoader code to put it on the display.

Really? Does that work? Should that be a .bmp file?

Static bitmaps use .png format, is there a dynamic bitmap loader for .png?

I thought I'd ask before I spend a bunch of time debugging.

Thanks,

Andrei

This topic has been closed for replies.
LouisBBest answer
ST Employee
Jul 16, 2025 9:43 AM UTC

Hello @Andrei Chichak ,

Yes, you are right it should be ".bmp" not ".jpg", this will be corrected.
Static images are cpp files that are compiled with your app, if you need to load image at runtime you need to use dynamic bitmap.

BR,

 

Louis BOUDOST Software Engineer | TouchGFX

3 replies

ST Employee
Jul 15, 2025 9:31 AM UTC

Hello @Andrei Chichak ,

This is possible but it's out of touchGFX scope, as you may need to use a file system library,to read files by name from an SD card (like in the example).
Here the documentation to FreeRtos Plus Fat if you are using FreeRtos: FreeRTOS-Plus-FAT - FreeRTOS™
Also you can draw inspiration from Loading Images at Runtime STM32F764 - STMicroelectronics Community

BR,

Louis BOUDOST Software Engineer | TouchGFX
Andrei Chichak
Lead
Jul 15, 2025 9:47 PM UTC

Bad me, I've asked more than one question.

In the linked documentation page, you open a .jpg file and process it with BMP functions. Is this a mistake?

Thanks,

Andrei

LouisBBest answer
ST Employee
Jul 16, 2025 9:43 AM UTC

Hello @Andrei Chichak ,

Yes, you are right it should be ".bmp" not ".jpg", this will be corrected.
Static images are cpp files that are compiled with your app, if you need to load image at runtime you need to use dynamic bitmap.

BR,

 

Louis BOUDOST Software Engineer | TouchGFX