Is there a really simple example of displaying an image using lvgl in Arduino using the Online image converter - BMP, JPG or PNG to C array or binary | LVGL? I'm using the image as a variable using the contents from the generated file from the online image converter in LVGL with the output format being a c array.
I have tried following the lvgl docs Images — LVGL documentation, and looked at the GitHub example lvgl/LVGL_Arduino.ino at master · lvgl/lvgl (github.com), but I'm just fighting through error after error and it seems like I'm getting further from basic solution.
I just want to show an image in the device (smart watch screen)...I guess on setup.
My current error is this:
image1.h:253:3: error: expected primary-expression before '.' token
.header.cf = LV_IMG_CF_TRUE_COLOR,
^
image1.h:254:3: error: expected primary-expression before '.' token
.header.always_zero = 0,
^
image1.h:255:3: error: expected primary-expression before '.' token
.header.reserved = 0,
^
image1.h:256:3: error: expected primary-expression before '.' token
.header.w = 50,
^
image1.h:257:3: error: expected primary-expression before '.' token
.header.h = 50,
^
exit status 1
expected primary-expression before '.' token
For this code:
const lv_img_dsc_t icon1 = {
.header.cf = LV_IMG_CF_TRUE_COLOR,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 50,
.data_size = 2500 * LV_COLOR_SIZE / 8,
.data = icon1_map,
};