fix(draw): fix rgb565 with LV_BLEND_MODE_MULTIPLY (#5749)

Co-authored-by: Jimmy <jimmy@jeilin.com>
This commit is contained in:
JLJimmyH 2024-02-29 14:41:36 +08:00 committed by GitHub
parent 7a65a5328c
commit 16eb744b52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 1 deletions

View File

@ -505,7 +505,7 @@ static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(_lv_draw_sw_blend_image_dsc
case LV_BLEND_MODE_MULTIPLY:
res = ((dest_buf_c16[dest_x].red * (src_buf_u8[src_x + 2] >> 3)) >> 5) << 11;
res += ((dest_buf_c16[dest_x].green * (src_buf_u8[src_x + 1] >> 2)) >> 6) << 5;
res += (dest_buf_c16[dest_x].blue * (src_buf_u8[src_x + 1] >> 3)) >> 5;
res += (dest_buf_c16[dest_x].blue * (src_buf_u8[src_x + 0] >> 3)) >> 5;
break;
default:
LV_LOG_WARN("Not supported blend mode: %d", dsc->blend_mode);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB