STM32F429 load png picture from sd card

Description

My platform is STM32F429 and my filesystem is fatfs.lv_fs_if is usefull to load the bin picture from the sd card.But png is not.

What MCU/Processor/Board and compiler are you using?

stm32f429

What LVGL version are you using?

7.0

What do you want to achieve?

I want to load png picture from the sd card directly.

What have you tried so far?

I have loaded the bin from the sd card successfully.

Code to reproduce

lv_fs_if_init();

lv_png_init();

lv_obj_t * img_obj = lv_img_create(lv_scr_act(), NULL);     //Create the an image object in LittlevGL//

lv_img_set_src(img_obj, "S:3.png");

////lv_img_set_src(img_obj, "S:my_img.bin");//

The code block(s) should be formatted like:

/*You code here*/

The issue is lv_lib_png didn’t use LVGL’s filesystem API but C API (e.g. fopen ).

I’ve just added support to LVGL’s filesystem. See the README here: https://github.com/lvgl/lv_lib_png#use-png-images-from-file

I stop to use lv_lib_png.lv_fs_if_init is work. I can load my bin picture from sd card which is my fatfs system .So i think lv_fs_if_init is useful in my filesystem.
image

I have refreshed the lv_lib_png code.But it prints an error about memory;

error 83: memory allocation failed

where i need to modify the memory? I have a sdram,if i can use it ?

thanks

Increase LV_MEM_SIZE, or enable LV_MEM_CUSTOM and point it to your SDRAM heap allocator (if you have one).

I have already ennabled it before . But it doesn’t work.

It’s not useful.

Look forward to your reply. Thanks.

You get the same error?

yes,the same error.

What i can do next to slove my problem?

Look forword to your reply.

Maybe you don’t have enough free memory to allocate?
Still after changing the memory, it crashes at the same point?

I have change the addr and the size ,but it still print the same error. I am so sad.

my code is here.https://gitee.com/MyWork_YES/stm32429-bi_-s500-rlba

If you can help me to find what the probelm is .