Please help for convert bmp to array from sd card

hello guys, hope you having great day

I'm trying to bmp image from sd card to display on my ttgo twatch with lvgl librarie,

Here's example of how lvgl image creating work

uint8_t my_img_data = {0x00, 0x01, 0x02, ...};

static lv_img_dsc_t my_img_dsc = {
.header.always_zero = 0,
.header.w = 80,
.header.h = 60,
.data_size = 80 * 60 * LV_COLOR_DEPTH / 8,
.header.cf = LV_IMG_CF_TRUE_COLOR, /Set the color format/
.data = my_img_data,
};

So all i need is convert bmp from sdcard in to array, and import it in 'my_img_data ='

Can anyone please help me?

+ttgo twatch using same <SD.h> with arduino

What have YOU tried? step up with some effort and this forum will assist.

I tried lvgl's funtion that direct load image from sdcard but it didn't work for some reason

I guess there may be problem with ttgo's lvgl driver porting

So I tried to add driver following lvgl's tutorial but its way too over my coding skill

So spent all 2 day for google with hope may someone post tutorial for load image from sd card with ttgo watch, but theres no one :frowning:

Then back to lvgl page, find lvgl png decoder work with lodepng.h, i follow the tutorial,
And all it do was returning error message for
No
'Return code is 0'

Again back to lvgl page, found the image creating code i posted.

So google for another day, but what i found was just web page image converters

So... yeah here i am