1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-02-04 07:13:00 +08:00

built-in img decodder read line bug fix

This commit is contained in:
Gabor Kiss-Vamosi 2019-05-17 09:03:53 +02:00
parent b842db91aa
commit 1ef0c197cd

View File

@ -417,12 +417,15 @@ static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, l
lv_res_t res = LV_RES_INV;
if(dsc->src_type == LV_IMG_SRC_FILE) {
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR ||
dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED)
{
/* For TRUE_COLOE images read line required only for files.
* For variables the image data was returned in `open`*/
if(dsc->src_type == LV_IMG_SRC_FILE) {
res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf);
}
} else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT ||
dsc->header.cf == LV_IMG_CF_ALPHA_2BIT ||
dsc->header.cf == LV_IMG_CF_ALPHA_4BIT ||
@ -438,7 +441,6 @@ static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, l
LV_LOG_WARN("Built-in image decoder read not supports the color format");
return false;
}
}
return res;
}