cancel
Showing results for 
Search instead for 
Did you mean: 

QuadSPI Memory usage in STM32CUBEIDE is larger than all pictures in Asset Folder.

davaba
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

7 REPLIES 7

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

The fine manual describes a more compact image format than png.

davaba
Associate II

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.

davaba
Associate II

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 ?

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.

thank you @MM..1​ 

Pavel A.
Evangelist III

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).