Important: unclear posts may not receive useful answers.
Before posting
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
master
branch.- Be sure you have checked the FAQ and read the relevant part of the documentation.
- If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
Description
What MCU/Processor/Board and compiler are you using?
STM32L4
What LVGL version are you using?
v8.3
What do you want to achieve?
I want to set my dog image as a LCD background image. How can i ??
What have you tried so far?
I’m trying to use lv_img. But I don’t know how use this API.
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
void Display_init(void)
{
// draw buffer
static lv_disp_draw_buf_t disp_buf;
static lv_color_t buf_1[SSD1327_LCDWIDTH * 10];
static lv_color_t buf_2[SSD1327_LCDWIDTH * 10];
lv_disp_draw_buf_init(&disp_buf, buf_1, buf_2, SSD1327_LCDWIDTH * 10);
// Driver
lv_disp_drv_init(&disp_drv);
disp_drv.draw_buf = &disp_buf;
disp_drv.flush_cb = my_flush_cb;
disp_drv.hor_res = SSD1327_LCDWIDTH;
disp_drv.ver_res = SSD1327_LCDHEIGHT;
lv_disp_t *disp = lv_disp_drv_register(&disp_drv);
lv_disp_set_bg_image(disp, &cat_image);
}
This is my code. Am i wrong??
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.