Description
Need help to display an image from url.
What MCU/Processor/Board and compiler are you using?
Linux dev env
What LVGL version are you using?
v9
What do you want to achieve?
I have the raw bytes of the image that I request using curl and I want to render on the screen.
What have you tried so far?
A lot of things that I can even remember
Code to reproduce
Right now, the code looks something like this:
lv_img_dsc_t img_dsc;
img_dsc.header.w = 256;
img_dsc.header.h = 256;
img_dsc.header.cf = LV_COLOR_FORMAT_RGB888;
img_dsc.data = imageBuffer;
img_dsc.data_size = imageBuffeSize;
lv_obj_t *img= lv_img_create(lv_obj);
lv_img_set_src(img, &img_dsc);
Sometimes I get random garbage (letters and symbols) on the screen.
I don’t know if i need to change to the color format or I need to extende the libpng driver functionality? or somehting… Any help is appreciated!