1 #include "../../lv_examples.h"
2 #if LV_USE_GIF && LV_BUILD_EXAMPLES
3 
4 /**
5  * Open a GIF image from a file and a variable
6  */
lv_example_gif_1(void)7 void lv_example_gif_1(void)
8 {
9     LV_IMG_DECLARE(img_bulb_gif);
10     lv_obj_t * img;
11 
12     img = lv_gif_create(lv_scr_act());
13     lv_gif_set_src(img, &img_bulb_gif);
14     lv_obj_align(img, LV_ALIGN_LEFT_MID, 20, 0);
15 
16     img = lv_gif_create(lv_scr_act());
17     /* Assuming a File system is attached to letter 'A'
18      * E.g. set LV_FS_STDIO_LETTER 'A' in lv_conf.h */
19     lv_gif_set_src(img, "A:lvgl/examples/libs/gif/bulb.gif");
20     lv_obj_align(img, LV_ALIGN_RIGHT_MID, -20, 0);
21 }
22 
23 #endif
24