Hi there,
i read a lot of threads that handle similar topics but unfortunately I did not find a solution for my issue yet.
Description
I have two different framebuffers, one with an image that may change unpredictably and an other FB that should be filled with an graphical overlay created with lvgl.
Alpha-blending of both framebuffers is handled by HW.
As you can see in the attached picture the text that lvgl produces has some ugly artifacts around the single characters. The blue/yellow/magenta color is part of the image layer.
If the image layer is black, the grey characters are looking pretty well.
The attached image is captured with blend mode “LV_BLEND_MODE_NORMAL”.
Other blend modes produce better characters but the characters get black instead of grey.
I read here that opacity may only be 0% or 100% for images. I don’t know if this is also valid for characters?
What MCU/Processor/Board and compiler are you using?
Arm Cortex A53 Quad Core
Gnu GCC compiler
Enough RAM for at least 4 Framebuffers
Display Resolution 1024x768
What LVGL version are you using?
8.3
What do you want to achieve?
Show characters and bitmaps as overlay without artifacts and semi-transparency.
What have you tried so far?
#define LV_COLOR_DEPTH 32
#define LV_COLOR_SCREEN_TRANSP 1
different blend modes:
LV_BLEND_MODE_NORMAL, /**< Simply mix according to the opacity value*/
LV_BLEND_MODE_ADDITIVE, /**< Add the respective color channels*/
LV_BLEND_MODE_SUBTRACTIVE,/**< Subtract the foreground from the background*/
LV_BLEND_MODE_MULTIPLY, /**< Multiply the foreground and background*/
LV_BLEND_MODE_REPLACE, /**< Replace background with foreground in the area*/
Code to reproduce
#define LV_COLOR_DEPTH 32
#define LV_COLOR_SCREEN_TRANSP 1
ui_Screen = lv_obj_create(NULL);
lv_obj_set_style_bg_color(ui_Screen, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_Screen, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_test = lv_label_create(ui_Screen);
lv_label_set_text(ui_test, "TEST");
lv_label_set_recolor(ui_test, "true");
lv_obj_set_style_text_color(ui_test, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_test, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_test, &lv_font_montserrat_30, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_blend_mode(ui_test, LV_BLEND_MODE_NORMAL, LV_PART_MAIN | LV_STATE_DEFAULT);