try this: lv_obj_set_style_local_pattern_image(screen,LV_OBJ_PART_MAIN,LV_STATE_DEFAULT,&img_bg);
lv_obj_set_style_local_pattern_image(screen,LV_OBJ_PART_MAIN,LV_STATE_DEFAULT,&img_bg);