Hello folk,
I want to build an background based on binary images, which changes every 10 sec.
I created my own lv_img_dsc_t:
const lv_img_dsc_t bg1 = {
.header.always_zero = 0,
.header.w = 320,
.header.h = 240,
.data_size = 38464,
.header.cf = LV_IMG_CF_INDEXED_4BIT, /Set the color format/
.data = my_img_data+4,
};
lv_obj_t * scr1 = lv_scr_act();
lv_obj_t *img_bg = lv_img_create(scr1, NULL);
lv_img_set_src(img_bg, &bg1);
the pointer my_img_data will be filled by reading binary file from SPIFFS in function
set_bg_img(0, my_img_data);
in a loop i just set:
while(1) {
…
set_bg_img(screen, my_img_data); // uint8 screen number
…
}
it works fine for first image, all next images have wrong color, seems to be they are blended with first image colors.
I tried also to delete the object and create it new in the loop, nothing helps
any hints,
Cheers,
Mike
V7.9, ESP32, M5STACK
first img, correct color
second img, wrong color, it should be green
when I set img 2 at first, then it is correct green, and the second is green as well