2022-10-07 01:39 PM
Hi. I made a project with stm32cubemx and add touchgfx.
then I added some images to the asset folder and compile the project.
I used NOR Flash(External Flash) for saving the images.
the problem is that the memory usage in cubeide for pictures is larger than all images in the asset folder. This issue causes the external memory to fill up quickly.
Does anyone know how to solve it?
Solved! Go to Solution.
2022-10-08 06:27 AM
Ahh @davaba you repeat same question , that is not about STM or coding.
You need learn what is digital image.
Little match example image 100x100px
L8 format every px need one byte = 10000bytes
RGB565 two bytes per px = 20000bytes
RGB888 30000
ARGB8888 40000
same image in jpg can be compressed 100:1 = 400bytes file jpg
same png maybe 20:1 = 2000bytes
but compression result is based on image.
2022-10-07 02:43 PM
Perhaps it's a raw image/bitmap rather than a compressed one, ie .PNG, .JPG, etc ?
Perhaps manage them as files, but then would need RAM and unpacking routines
Is 35KB the size of the frame buffer?
2022-10-07 05:59 PM
The fine manual describes a more compact image format than png.
2022-10-08 02:47 AM
Hi @Tesla Delorean.
Thank you for response.
35KB is the size that STM32CUBEIDE Considered for saving the image in QuadSpi.
the next image start address is 0x90008C00 . (0x8C00 = 35840 bytes)
I Test the L_RGB565 for project in Touchgfx But not much difference was seen.
2022-10-08 02:54 AM
Hi @Pavel A.
my Image Configuration setting is RGB565 in Hardware .
So I tested the L8_RGB565 format . but not big difference .
Why should there be such a difference between the original photo and the �?Compiled image in CUBEIDE?
is there any setting for image saving/Compressing in CUBEIDE ?
Dose anyone know about it ?
2022-10-08 06:27 AM
Ahh @davaba you repeat same question , that is not about STM or coding.
You need learn what is digital image.
Little match example image 100x100px
L8 format every px need one byte = 10000bytes
RGB565 two bytes per px = 20000bytes
RGB888 30000
ARGB8888 40000
same image in jpg can be compressed 100:1 = 400bytes file jpg
same png maybe 20:1 = 2000bytes
but compression result is based on image.
2022-10-08 12:22 PM
thank you @MM..1
2022-10-08 01:01 PM
STemWin library supports PNG images, with additional code available from Segger.
Not sure if it can be ported into TouchGFX and what would be license complications (because it pulls in some opensource decompression stuff).
Storing images in png format will require to decompress them every time (consider time and RAM needed to decompress).