Description
I’ve trying dozen of ways to get a gif to display on my Xiao Round screen.
The gif is on the sd card and lv_fs_open
opens it successfully.
However I get an error with lv_gif_set_src
File opened successfully!
[LVGL] Level 2: [Warn] (0.729, +729) lv_gif_set_src: Couldn’t load the source lv_gif.c:83
What MCU/Processor/Board and compiler are you using?
Xiao ESP32S3 on Arduino IDE
What LVGL version are you using?
9.2
What do you want to achieve?
Display a gif
What have you tried so far?
Code to reproduce
#define LV_USE_GIF 1
#define LV_USE_FS_FATFS 1
#define LV_FS_FATFS_LETTER 'A'
#define LV_FS_FATFS_PATH "/"
lv_fs_file_t f;
lv_fs_res_t res = lv_fs_open(&f, "A:/sleep.gif", LV_FS_MODE_RD);
if(res == LV_FS_RES_OK) {
Serial.println("File opened successfully!");
lv_fs_close(&f);
} else {
Serial.printf("Failed to open file. Error code: %d\n", (int)res);
}
backgroundGif = lv_gif_create(lv_screen_active());
lv_image_set_src(backgroundGif, "A:/sleep.gif");
lv_obj_center(backgroundGif);