Question about drawing the image

Hi everyone.

currenlty, I did draw the image file from flash memory using below api;

lv_img_set_src(img, “S:/img/test.bin”);

but I wonder is there any way to draw the image which is on memory?

for example… .
image file is on S:/img/test.bin. so I just want to do like below;
is it possible?
when I try to do like below, there is no reponse on the screen

if is there any way, please let me know.

  • lv_fs_file_t f;
    lv_fs_res_t res;
    res = lv_fs_open(&f, “S:/img/test.bin”, LV_FS_MODE_RD);

    char *buf = lv_mem_alloc(image_size); // we already knew the size of image.
    res = lv_fs_read(&f, buf, image_size, &read_num);
    lv_fs_close(&f);

    lv_img_set_src(win_ctx->img, buf); // ???

Thanks

I understood how to use the .bin file which is on memory.
By referring to the c_array structure, I add some information to bin file.
so I can draw the binary file on memory ( Not flash memory )

Thanks