How to use canvas in a screen higher than 2048 pixels(the max height of the image in lvgl)?

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

I want to draw some lines in the screen with lv_canvas, but when set buffer to the canvas i found that the max width/height of the image map is 2048:
typedef struct {
uint32_t cf : 5;
uint32_t always_zero : 3;
uint32_t reserved : 2;
uint32_t w : 11;
uint32_t h : 11;
} lv_img_header_t;
Thus if i set the height as 2400. it turns out to be 352.
Is there any way to solve the problem?

What LVGL version are you using?

7.4

1 Like

It’s really a limitation even in v8. In v9 it will be improved. Until that you can change

uint32_t reserved : 2;
uint32_t w : 11;
uint32_t h : 11;

to

uint32_t w : 12;
uint32_t h : 12;

but I haven’t tested if it really works.