1 #include "../../lv_examples.h"
2 #if LV_USE_LODEPNG && LV_USE_IMAGE && LV_BUILD_EXAMPLES
3 
4 /**
5  * Open a PNG image from a file and a variable
6  */
lv_example_lodepng_1(void)7 void lv_example_lodepng_1(void)
8 {
9     LV_IMAGE_DECLARE(img_wink_png);
10     lv_obj_t * img;
11 
12     img = lv_image_create(lv_screen_active());
13     lv_image_set_src(img, &img_wink_png);
14     lv_obj_align(img, LV_ALIGN_LEFT_MID, 20, 0);
15 
16     img = lv_image_create(lv_screen_active());
17     /* Assuming a File system is attached to letter 'A'
18      * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */
19     lv_image_set_src(img, "A:lvgl/examples/libs/lodepng/wink.png");
20     lv_obj_align(img, LV_ALIGN_RIGHT_MID, -20, 0);
21 }
22 
23 #endif
24