24#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
25#define LV_IMG_PX_SIZE_ALPHA_BYTE 2
26#elif LV_COLOR_DEPTH == 16
27#define LV_IMG_PX_SIZE_ALPHA_BYTE 3
28#elif LV_COLOR_DEPTH == 32
29#define LV_IMG_PX_SIZE_ALPHA_BYTE 4
32#define LV_IMG_BUF_SIZE_TRUE_COLOR(w, h) ((LV_COLOR_SIZE / 8) * w * h)
33#define LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_SIZE / 8) * w * h)
34#define LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h)
37#define LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h) ((((w / 8) + 1) * h))
38#define LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h) ((((w / 4) + 1) * h))
39#define LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h) ((((w / 2) + 1) * h))
40#define LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h) ((w * h))
43#define LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2)
44#define LV_IMG_BUF_SIZE_INDEXED_2BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4)
45#define LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16)
46#define LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256)
48#define _LV_ZOOM_INV_UPSCALE 5
56 LV_IMG_CF_UNKNOWN = 0,
105typedef uint8_t lv_img_cf_t;
114#if LV_BIG_ENDIAN_SYSTEM
119 uint32_t reserved : 2;
120 uint32_t always_zero : 3;
129 uint32_t always_zero : 3;
132 uint32_t reserved : 2;
void lv_img_buf_set_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa)
@ LV_IMG_CF_INDEXED_8BIT
Definition lv_img_buf.h:72
@ LV_IMG_CF_ALPHA_1BIT
Definition lv_img_buf.h:74
@ LV_IMG_CF_RAW_CHROMA_KEYED
Definition lv_img_buf.h:61
@ LV_IMG_CF_USER_ENCODED_0
Definition lv_img_buf.h:96
@ LV_IMG_CF_ALPHA_2BIT
Definition lv_img_buf.h:75
@ LV_IMG_CF_RESERVED_17
Definition lv_img_buf.h:88
@ LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED
Definition lv_img_buf.h:66
@ LV_IMG_CF_USER_ENCODED_3
Definition lv_img_buf.h:99
@ LV_IMG_CF_RESERVED_20
Definition lv_img_buf.h:91
@ LV_IMG_CF_TRUE_COLOR_ALPHA
Definition lv_img_buf.h:65
@ LV_IMG_CF_USER_ENCODED_1
Definition lv_img_buf.h:97
@ LV_IMG_CF_RESERVED_18
Definition lv_img_buf.h:89
@ LV_IMG_CF_USER_ENCODED_5
Definition lv_img_buf.h:101
@ LV_IMG_CF_RESERVED_19
Definition lv_img_buf.h:90
@ LV_IMG_CF_ALPHA_4BIT
Definition lv_img_buf.h:76
@ LV_IMG_CF_USER_ENCODED_7
Definition lv_img_buf.h:103
@ LV_IMG_CF_RESERVED_21
Definition lv_img_buf.h:92
@ LV_IMG_CF_INDEXED_2BIT
Definition lv_img_buf.h:70
@ LV_IMG_CF_ALPHA_8BIT
Definition lv_img_buf.h:77
@ LV_IMG_CF_USER_ENCODED_6
Definition lv_img_buf.h:102
@ LV_IMG_CF_RESERVED_23
Definition lv_img_buf.h:94
@ LV_IMG_CF_USER_ENCODED_2
Definition lv_img_buf.h:98
@ LV_IMG_CF_RAW_ALPHA
Definition lv_img_buf.h:59
@ LV_IMG_CF_RESERVED_16
Definition lv_img_buf.h:87
@ LV_IMG_CF_INDEXED_4BIT
Definition lv_img_buf.h:71
@ LV_IMG_CF_RESERVED_15
Definition lv_img_buf.h:86
@ LV_IMG_CF_TRUE_COLOR
Definition lv_img_buf.h:64
@ LV_IMG_CF_INDEXED_1BIT
Definition lv_img_buf.h:69
@ LV_IMG_CF_RAW
Definition lv_img_buf.h:58
@ LV_IMG_CF_USER_ENCODED_4
Definition lv_img_buf.h:100
@ LV_IMG_CF_RESERVED_22
Definition lv_img_buf.h:93
void _lv_img_buf_get_transformed_area(lv_area_t *res, lv_coord_t w, lv_coord_t h, int16_t angle, uint16_t zoom, const lv_point_t *pivot)
uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
void lv_img_buf_set_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c)
lv_img_dsc_t * lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t color)
lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y)
void lv_img_buf_set_palette(lv_img_dsc_t *dsc, uint8_t id, lv_color_t c)
void lv_img_buf_free(lv_img_dsc_t *dsc)
Definition lv_img_buf.h:141
const uint8_t * data
Definition lv_img_buf.h:144
lv_img_header_t header
Definition lv_img_buf.h:142
uint32_t data_size
Definition lv_img_buf.h:143