Description
I want to reduce the memory size of the image while increasing the height/width. The PNG images I use are a single color with transparency. I would like to get them to 100x100 or even 150x150 but I have minimal RAM (64) to play with and want to ensure the transfer is as quick as possible. I’m not sure if using LV_IMG_CF_INDEXED_1/2/4/8BIT or LV_IMG_CF_ALPHA_1/2/4/8BIT would help me get there. Right now I’m testing with 32x32 and a 16bit color depth with a size of 2049 (data_size = 2049 * LV_COLOR_SIZE / 8).
What MCU/Processor/Board and compiler are you using?
PineTime nRF52832
What LVGL version are you using?
8.3
What do you want to achieve?
Increase maximizing hight/width of image while minimizing memory size.
What have you tried so far?
I just got this working, so I haven’t tried much else and I’m somewhat of a novice. I was thinking either this approach or a custom format, but I’m not really excited about the latter option and think it might be beyond my skill anyway.
Code to reproduce
This is what I’m using to display the image:
lv_img_cache_invalidate_src(NULL);
lv_img_dsc_t img_dsc = {
.header.cf = LV_IMG_CF_TRUE_COLOR,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 32,
.header.h = 32,
.data_size = 2049 * LV_COLOR_SIZE / 8,
.data = img_src,
};
lv_img_set_src(screen_image, &img_dsc);