Skip to main content
AMars.4
Associate III
March 12, 2025
Solved

Dynamic Bitmaps (JPEG) from SD card, scale and rotate using texture mapper.

  • March 12, 2025
  • 3 replies
  • 665 views

From what I read we should be able to save JPEG images to an SD card, and then load these into a dynamic bitmap via a combination of FatFS (or whatever) and LibJPEG, in order to display. A couple of questions:

Could a texture mapper then use this image, so that we can apply scale and rotate?

Are scale and rotate purely done in software, I assume this is the case, but maybe it depends on the MCU?

I will be using the STM32U5G9J-DK2 for testing.

Many Thanks,

Anthony

Best answer by GaetanGodart

Hello @AMars.4 ,

 

The STM32U5G5J-DK2 have NeoChrom VG that improve texture mapper rendering!

You could indeed get your image from an SD card and then load it to your texture mapper at runtime.

 

Here are some useful links to help you fetch data from an SD card:

https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/caching-bitmaps

https://support.touchgfx.com/docs/development/scenarios/using-non-memory-mapped-flash

https://www.youtube.com/watch?v=-0kFwp0ao6k

https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32746G-Discovery/Applications/Display/LTDC_PicturesFromSDCard

 

Regards,

3 replies

AMars.4
AMars.4Author
Associate III
March 12, 2025

Seems like only the U599 / U5A9 parts have the NeoChrom GPU which is required for hardware scale & rotate, so not available for my target board, it would have to be done in software.

 

 

 

GaetanGodart
GaetanGodartBest answer
Technical Moderator
March 12, 2025

Hello @AMars.4 ,

 

The STM32U5G5J-DK2 have NeoChrom VG that improve texture mapper rendering!

You could indeed get your image from an SD card and then load it to your texture mapper at runtime.

 

Here are some useful links to help you fetch data from an SD card:

https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/caching-bitmaps

https://support.touchgfx.com/docs/development/scenarios/using-non-memory-mapped-flash

https://www.youtube.com/watch?v=-0kFwp0ao6k

https://github.com/STMicroelectronics/STM32CubeF7/tree/master/Projects/STM32746G-Discovery/Applications/Display/LTDC_PicturesFromSDCard

 

Regards,

AMars.4
AMars.4Author
Associate III
March 12, 2025

Thank you, yes I realised I was looking at some old documentation! 

Good to know, I will test it :)

GaetanGodart
Technical Moderator
March 12, 2025

My pleasure! :smiling_face_with_smiling_eyes: