From 9a1e385b2b3498ed70704bf0ed33e4bd263747d8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 7 Feb 2022 19:14:37 +0100 Subject: [PATCH] docs(images): fix notes about breaking change inf v8.2 Indexed images are not chroma keyed. Use the alpha chaneel instead. Realted to: https://forum.lvgl.io/t/8-2-0-image-drawing-renders-actual-color-defined-for-transparency-in-lv-img-cf-indexed-8bit-images-8-1-0-and-prior-did-not/8133 --- docs/CHANGELOG.md | 1 + src/draw/lv_img_buf.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index c65d07dd9..21faf1e5d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -23,6 +23,7 @@ The GPU support for NXP microcontrollers is still not updated to the new draw ar - :warning: feat(fs): add caching option for lv_fs-read [`2979`](https://github.com/littlevgl/lvgl/pull/2979) - :warning: feat(span): lv_spangroup_get_expand_width() adds a parameter [`2968`](https://github.com/littlevgl/lvgl/pull/2968) - :warning: arch(draw): allow replacing the draw engine [`db53ea9`](https://github.com/littlevgl/lvgl/commit/db53ea925c9502b20f38db0fc30c4ef599bdfc33) +- :warning: indexed images are not chroma keyed. Use the alpha chaneel instead. ### Architectural diff --git a/src/draw/lv_img_buf.h b/src/draw/lv_img_buf.h index 984483e5e..de8819c8e 100644 --- a/src/draw/lv_img_buf.h +++ b/src/draw/lv_img_buf.h @@ -67,10 +67,10 @@ enum { LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /**< Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels will be transparent*/ - LV_IMG_CF_INDEXED_1BIT, /**< Can have 2 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_2BIT, /**< Can have 4 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_4BIT, /**< Can have 16 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_8BIT, /**< Can have 256 different colors in a palette (always chroma keyed)*/ + LV_IMG_CF_INDEXED_1BIT, /**< Can have 2 different colors in a palette (can't be chroma keyed)*/ + LV_IMG_CF_INDEXED_2BIT, /**< Can have 4 different colors in a palette (can't be chroma keyed)*/ + LV_IMG_CF_INDEXED_4BIT, /**< Can have 16 different colors in a palette (can't be chroma keyed)*/ + LV_IMG_CF_INDEXED_8BIT, /**< Can have 256 different colors in a palette (can't be chroma keyed)*/ LV_IMG_CF_ALPHA_1BIT, /**< Can have one color and it can be drawn or not*/ LV_IMG_CF_ALPHA_2BIT, /**< Can have one color but 4 different alpha value*/