Description
I am trying to output an image via an external file.
If I output the image through C Arry, then 2 kB of RAM is used, if through FAT FS + lv_fs_if
(pre-converting to *.bin), then 21 kB of RAM is used. The image is 20x20 px.
Moreover, if you do lv_obj_del (img); memory is not freed!
Since I did everything on libraries, I decided to ask if anyone had such problems and what can you advise. Thank you
What MCU/Processor/Board and compiler are you using?
STM32F4, custom board
What LVGL version are you using?
LVGL - 8.0.1
lv_fs_if - latest version
FAT FS - from the composition latest version CubeMX
What do you want to achieve?
Output image from external file without memory loss
What have you tried so far?
I tried to read files through JPG and PNG decoders, the result is the same. FATFS checked by reading txt file through lv_fs_read. Everything is working.
Code to reproduce
LV_IMG_DECLARE(img_test);
lv_obj_t * img1 = lv_img_create(parent);
//consumes a lot of RAM
lv_img_set_src(img1, "1:res/img.bin");
//consumes little RAM
lv_img_set_src(img1, &img_test);
If you open this way, the memory is also not freed.
lv_fs_file_t f;
lv_fs_res_t res;
res = lv_fs_open(&f, "1:res/img.bin", LV_FS_MODE_RD);
lv_fs_close(&f);
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.