mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(png): use LV_IMG_CF_TRUE_COLOR_ALPHA instead of LV_IMG_CF_RAW_ALPHA (#3212)
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
6185da3d76
commit
f9b554503e
@ -91,7 +91,7 @@ static lv_res_t decoder_info(struct _lv_img_decoder_t * decoder, const void * sr
|
|||||||
|
|
||||||
/*Save the data in the header*/
|
/*Save the data in the header*/
|
||||||
header->always_zero = 0;
|
header->always_zero = 0;
|
||||||
header->cf = LV_IMG_CF_RAW_ALPHA;
|
header->cf = LV_IMG_CF_TRUE_COLOR_ALPHA;
|
||||||
/*The width and height are stored in Big endian format so convert them to little endian*/
|
/*The width and height are stored in Big endian format so convert them to little endian*/
|
||||||
header->w = (lv_coord_t)((size[0] & 0xff000000) >> 24) + ((size[0] & 0x00ff0000) >> 8);
|
header->w = (lv_coord_t)((size[0] & 0xff000000) >> 24) + ((size[0] & 0x00ff0000) >> 8);
|
||||||
header->h = (lv_coord_t)((size[1] & 0xff000000) >> 24) + ((size[1] & 0x00ff0000) >> 8);
|
header->h = (lv_coord_t)((size[1] & 0xff000000) >> 24) + ((size[1] & 0x00ff0000) >> 8);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user