1 #include "../../lv_examples.h" 2 #if LV_BUILD_EXAMPLES 3 4 #if LV_USE_LIBJPEG_TURBO 5 6 /** 7 * Load a JPG image 8 */ lv_example_libjpeg_turbo_1(void)9void lv_example_libjpeg_turbo_1(void) 10 { 11 lv_obj_t * wp; 12 13 wp = lv_image_create(lv_screen_active()); 14 /* Assuming a File system is attached to letter 'A' 15 * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ 16 lv_image_set_src(wp, "A:lvgl/examples/libs/libjpeg_turbo/flower.jpg"); 17 lv_obj_center(wp); 18 } 19 20 #else 21 lv_example_libjpeg_turbo_1(void)22void lv_example_libjpeg_turbo_1(void) 23 { 24 lv_obj_t * label = lv_label_create(lv_screen_active()); 25 lv_label_set_text(label, "LibJPEG-Turbo is not installed"); 26 lv_obj_center(label); 27 } 28 29 #endif 30 31 #endif 32