Description
What MCU/Processor/Board and compiler are you using? ESP32S3 IPS 480x800
What LVGL version are you using? 8.3.7
lvgl/lvgl@^8.3.7
moononournation/GFX Library for Arduino@1.3.5
What do you want to achieve?
Display a PNG image within a button or directly on screen,
Very small image 64x64 1 colour, with transparent background
The rendering is not fluide, and the screen is created
What have you tried so far?
Code to reproduce
lv_obj_t * img_bin = lv_img_create(scr);
lv_img_set_src(img_bin, filepathfrom_sd);
lv_obj_align(img_bin, LV_ALIGN_CENTER, 0, 0);
lv_obj_set_size(img_bin, h, w);
void lvgl_displayFlushCallBack(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p){
uint32_t w = (area->x2 - area->x1 + 1);
uint32_t h = (area->y2 - area->y1 + 1);
#if (LV_COLOR_16_SWAP != 0)
gfx->draw16bitBeRGBBitmap(area->x1, area->y1, (uint16_t *)&color_p->full, w, h);
#else
gfx->draw16bitRGBBitmap(area->x1, area->y1, (uint16_t *)&color_p->full, w, h);
#endif
lv_disp_flush_ready(disp);
}
I would really appreciate piece of code to see how I can cache image loading and more speed to render screen with image.
I must do something wrong
Thanks Vincent