Skip to content

Commit

Permalink
fix(color): treat RGB565A8 bpp same as RGB565
Browse files Browse the repository at this point in the history
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
  • Loading branch information
XuNeo committed Feb 4, 2024
1 parent 4a4d577 commit 52426ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/misc/lv_color.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ uint8_t lv_color_format_get_bpp(lv_color_format_t cf)
case LV_COLOR_FORMAT_A8:
case LV_COLOR_FORMAT_I8:
return 8;

case LV_COLOR_FORMAT_RGB565A8:
case LV_COLOR_FORMAT_RGB565:
return 16;

case LV_COLOR_FORMAT_RGB565A8:
case LV_COLOR_FORMAT_RGB888:
return 24;
case LV_COLOR_FORMAT_ARGB8888:
Expand Down
2 changes: 1 addition & 1 deletion src/misc/lv_color.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ typedef uint8_t lv_opa_t;
(cf) == LV_COLOR_FORMAT_A8 ? 8 : \
(cf) == LV_COLOR_FORMAT_I8 ? 8 : \
(cf) == LV_COLOR_FORMAT_RGB565 ? 16 : \
(cf) == LV_COLOR_FORMAT_RGB565A8 ? 24 : \
(cf) == LV_COLOR_FORMAT_RGB565A8 ? 16 : \
(cf) == LV_COLOR_FORMAT_RGB888 ? 24 : \
(cf) == LV_COLOR_FORMAT_ARGB8888 ? 32 : \
(cf) == LV_COLOR_FORMAT_XRGB8888 ? 32 : \
Expand Down

0 comments on commit 52426ec

Please sign in to comment.