Zooming in a simple bitmap image *30 times, you can clearly see that the enlarged image is distorted. LVGL version is 8.3.0.dev.
#include "../../lv_examples.h"
void lv_example_img_1(void)
{
/* 15*10 bitmap(with alpha byte, LV_COLOR_DEPTH =8) for char 'G'
" . . . . . . "
" . . . . . . . . "
". . . . . ."
". . . ."
". . "
". . "
". . "
". . "
". . . . . ."
". . . . . ."
". . . ."
". . . ."
". . . . ."
" . . . . . . . . "
" . . . . . . "
*/
static uint8_t imgData[] = {
0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00,
0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0xFF,0x00,
0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF,
0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF,
0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0xFF,0x00,
0xFF,0x00, 0xFF,0x00, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0x00,0xFF, 0xFF,0x00, 0xFF,0x00,
};
static lv_img_dsc_t img_dsc;
img_dsc.header.always_zero = 0;
img_dsc.header.w = 10;
img_dsc.header.h = 15;
img_dsc.data_size = 10 * 15 * LV_IMG_PX_SIZE_ALPHA_BYTE;
img_dsc.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
img_dsc.data = imgData;
lv_obj_t *img = lv_img_create(lv_scr_act());
lv_img_set_src (img, &img_dsc);
lv_img_set_zoom(img, 256*30); // zoom in X30
lv_img_set_size_mode(img, LV_IMG_SIZE_MODE_REAL);
lv_obj_center(img);
}