Display large image with small size object

I’m displaying 960 x 3256 image with object of size 220 x 175. It displaying only some part of the image even scroll to horizontal and vertical.

    lv_obj_t *img_box = lv_obj_create(drive->drive_obj);
    lv_obj_set_pos(img_box, 235, 45);
    lv_obj_set_size(img_box, 220, 175);
    lv_obj_add_flag(img_box, LV_OBJ_FLAG_SCROLLABLE);

    lv_obj_t *img = lv_img_create(img_box);
    lv_img_set_src(img, "S:/usb/image.bmp");
    lv_img_set_offset_x(img, 0);
    lv_img_set_offset_y(img, 0);
    lv_obj_align(img, LV_ALIGN_CENTER, 0, 0);

How to display complete image with scroll support.

At this moment LVGL supports only max 2047*2047 images. :frowning:

Understood. But it start displaying preview at middle of image. Not displaying from start.

If the image is larger then 2047x2047 the behavior is undefined.

Is it possible to increase maximum pixel support greater than 2048 ?
If Yes, could you please share location where need this modification.
We need support up to 4000 pixels.

You can manually edit lv_img_dsc_t like:

typedef struct {

    uint32_t cf : 5;          /*Color format: See `lv_img_color_format_t`*/
    uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a
                                 non-printable character*/

    uint32_t w : 12; /*Width of the image map*/
    uint32_t h : 12; /*Height of the image map*/
} lv_img_header_t;

In v9 we will support larger images too.

What is the size of the original photo?

1024 x 1024

can i use compress foto for make it smaller?