[LVGL8.3.11] Arduino Giga - Displaying BMP image from RAM

Description

Fairly new to LVGL and limited to using 8.3.11 as this is the latest version that works with the Arduino Giga display shield. I’m working on having an Arduino UNO transfer a 16-bit BMP image taken on an ArduCAM OV5642 to the Giga via Serial communication. The image is saved on the Arduino Giga as a char array of 153668 bytes (320x240x2 + 66 byte header + 2 byte termination [ 0xBB, 0xCC]). I’ve enabled BMP decoder in my lv_conf.h file and have tried using the following code to make the image appear:
lv_obj_t* preview;
preview = lv_img_create(Cam_screen);
lv_img_set_src(preview, &imgBMP);
lv_obj_set_height(preview, 240);
lv_obj_set_width(preview, 320);
lv_obj_set_pos(preview, 200, 200);

The best result I’ve been able to get so far is text of the first few characters of my BMP header: ‘BM6’ in the space where the image should appear on my screen.

Please provide guidance on how to properly refer to the BMP image from the Arduino Giga’s memory! Thank you!

What MCU/Processor/Board and compiler are you using?

The board that is responsible for rendering the BMP image is an Arduino Giga with the Giga display shield.

What LVGL version are you using?

8.3.11 - yes, I know its outdated but its the latest version that works vanilla with the Giga shield.

What do you want to achieve?

Render a 16-bit BMP image transferred from an Arduino UNO to an Arduino Giga and stored in a local variable.

What have you tried so far?

Listed above

Code to reproduce

          lv_obj_t* preview;
          preview = lv_img_create(Cam_screen);
          lv_img_set_src(preview, &imgBMP);
          lv_obj_set_height(preview, 240);
          lv_obj_set_width(preview, 320);
          lv_obj_set_pos(preview, 200, 200);

imgBMP is a char array of size 153668, which stores the 16-bit BMP hex data.
The code block(s) should be formatted like:


outside you dont read docu, solution is simple , when load cam image store it in right format for show no bmp.