What MCU/Processor/Board and compiler are you using?
Codeblock c/c++
What LVGL version are you using?
release v5.2-rc
What do you want to achieve?
change the background image of the demo in the simulator
What have you tried so far?
following the instructions on the official webpage of lvgl about image converter https, using the online converter to convert the background image into one c file and putting the c file under the directory of lv_examples\lv_apps\demo. Then changing the relative two lines of codes in the demo.c file as instructed on the webpage. However, the compiling progress failed when I was trying to rebuild the project.
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
#if LV_DEMO_WALLPAPER
LV_IMG_DECLARE(img_red_flower)
#endif
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Create a demo application
*/
void demo_create(void)
{
lv_coord_t hres = lv_disp_get_hor_res(NULL);
lv_coord_t vres = lv_disp_get_ver_res(NULL);
#if LV_DEMO_WALLPAPER
lv_obj_t * wp = lv_img_create(lv_disp_get_scr_act(NULL), NULL);
lv_img_set_src(wp, &img_red_flower);
lv_obj_set_width(wp, hres * 4);
lv_obj_set_protect(wp, LV_PROTECT_POS);
#endif