Description
I am trying to load images from the SD Card, but the “No data” icon appears when rendering
What MCU/Processor/Board and compiler are you using?
STM32F407
What LVGL version are you using?
LVGL: 8.0
lv_fs_if: commit 2cad463d99244822730171243f2646686b4cd14a (on Jun 3, 2021)
What do you want to achieve?
need to draw image from SDCard
What have you tried so far?
I connected FAT FS, checked the file reading by example. Reading works. When I try to read the image, I get “No data”. I convert the image with the parameters:
- Color format: True Color with Alpha
- Output format: Binary (tried every)
When calling a function lv_img_set_src under the debug, you can see that the width and height are determined correctly. I also tried different images in jpg, png formats
Code to reproduce
Example of reading a file (FATFS check)
The code block(s) should be formatted like:
//Example of reading a file (FATFS check)
lv_fs_file_t f;
lv_fs_res_t res;
res = lv_fs_open(&f, "1:res/test.txt", LV_FS_MODE_RD);
uint32_t read_num;
uint8_t buf[8] = {0,};
res = lv_fs_read(&f, buf, 8, &read_num);
lv_fs_close(&f);
//doesn't work like that
lv_img_set_src(target, "1:res/bleu_img3.bin");
//this is how it works (C array)
lv_img_set_src(target, &new_img);
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.