Getting repeating image when using png conversion tool and c array


When I follow the instructions for converting a png file to an image and using a pointer the image is repeated as opposed to being a single image displayed on the screen.

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


What LVGL version are you using?


What do you want to achieve?

A single image displayed in the center of the screen.

What have you tried so far?

Following the instructions here.

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:

void display_image() {
    lv_obj_t * img1 = lv_img_create(lv_scr_act());

    lv_img_set_src(img1, &icon10);

    lv_obj_align(img1, LV_ALIGN_CENTER, 0, 0);
    lv_obj_set_size(img1, 200, 200);


See Mosaic feature.

Your image object has to be same size as image, to ‘disable’ Mosaic.

Thank you