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
STM32F4, custom board
LVGL - 8.0.1
lv_fs_if - latest version
FAT FS - from the composition latest version CubeMX
Output image from external file without memory loss
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.
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);
If possible, add screenshots and/or videos about the current state.