cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX: PNG vs JPEG support and audio format recommendation on STM32U5

Ameni
Associate III

Hello,

I have a few questions regarding image and audio formats on STM32U5.

For graphics with TouchGFX, I see that PNG is usually used. However, in some MCU documentation it is recommended to use JPEG. Also, when I try to add a JPEG image directly in TouchGFX Designer, it does not work.

Which format is preferable between PNG and JPEG for TouchGFX?
Why is JPEG recommended in some MCU documentation?
Is JPEG intended only for dynamic loading with software or hardware decoding?
What is the recommended way to use JPEG images with TouchGFX, if possible?

Regarding audio on STM32U5, which audio format is recommended such as WAV, MP3, AAC or other?
Is there a specific library recommended for audio playback on STM32U5?
Is there an optimized solution provided by ST?

Thank you in advance for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Osman SOYKURT
ST Employee

Hello @Ameni ,

TouchGFX natively supports PNG as an image format and SVG for vector images. When you mention JPEG, I believe you are referring to the JPEG codec, correct? It is technically possible to use it with TouchGFX for JPEG images, but it is not supported natively

We use the JPEG codec  (or LibJPEG when the MCU does not provide one)  for video decoding in our Video widget. However, audio is not supported in TouchGFX; only the video frames are displayed.

Osman SOYKURT
ST Software Developer | TouchGFX

View solution in original post

2 REPLIES 2
MM..1
Chief III

Yu mix two different Q. TGFX images is for designer png or svg supported. PNG is converted to bitmap in flash.

Any other stored images formats isnt supported in designer only in code. Jpeg or BMP pictures on TouchGFX - STMicroelectronics Community

And U5 dont have audio decoders by hw, then is your choice how code and sw decoder you use.

Osman SOYKURT
ST Employee

Hello @Ameni ,

TouchGFX natively supports PNG as an image format and SVG for vector images. When you mention JPEG, I believe you are referring to the JPEG codec, correct? It is technically possible to use it with TouchGFX for JPEG images, but it is not supported natively

We use the JPEG codec  (or LibJPEG when the MCU does not provide one)  for video decoding in our Video widget. However, audio is not supported in TouchGFX; only the video frames are displayed.

Osman SOYKURT
ST Software Developer | TouchGFX