lv_image_dsc.h
API reference for lv_image_dsc.h
Enums
_lvimage_flags_t
| Name | Value | Description |
|---|---|---|
LV_IMAGE_FLAGS_PREMULTIPLIED | 0x0001 | For RGB map of the image data, mark if it's pre-multiplied with alpha. For indexed image, this bit indicated palette data is pre-multiplied with alpha. |
LV_IMAGE_FLAGS_COMPRESSED | 0x0008 | The image data is compressed, so decoder needs to decode image firstly. If this flag is set, the whole image will be decompressed upon decode, and get_area_cb won't be necessary. |
LV_IMAGE_FLAGS_ALLOCATED | 0x0010 | The image is allocated from heap, thus should be freed after use. |
LV_IMAGE_FLAGS_MODIFIABLE | 0x0020 | If the image data is malloced and can be processed in place. In image decoder post processing, this flag means we modify it in-place. |
LV_IMAGE_FLAGS_CUSTOM_DRAW | 0x0040 | The image has custom drawing methods. |
LV_IMAGE_FLAGS_USER1 | 0x0100 | Flags reserved for user, lvgl won't use these bits. |
LV_IMAGE_FLAGS_USER2 | 0x0200 | |
LV_IMAGE_FLAGS_USER3 | 0x0400 | |
LV_IMAGE_FLAGS_USER4 | 0x0800 | |
LV_IMAGE_FLAGS_USER5 | 0x1000 | |
LV_IMAGE_FLAGS_USER6 | 0x2000 | |
LV_IMAGE_FLAGS_USER7 | 0x4000 | |
LV_IMAGE_FLAGS_USER8 | 0x8000 |
lv_image_compress_t
| Name | Value | Description |
|---|---|---|
LV_IMAGE_COMPRESS_NONE | 0 | |
LV_IMAGE_COMPRESS_RLE | LVGL custom RLE compression | |
LV_IMAGE_COMPRESS_LZ4 |
Structs
struct
lv_image_header_t
Used by 3 functions
lv_image_decoder_get_info— paramheaderlv_nanovg_image_cache_get_handle— paramheaderlv_bin_decoder_info— paramheader
struct
lv_yuv_plane_t
| Member | Type | Description |
|---|---|---|
buf | void * | |
stride | uint32_t | Number of bytes in a row |
struct
lv_yuv_buf_t
| Member | Type | Description |
|---|---|---|
yuv | lv_yuv_plane_t | packed format |
y | lv_yuv_plane_t | |
u | lv_yuv_plane_t | |
v | lv_yuv_plane_t | |
planar | struct lv_yuv_buf_t | planar format with 3 plane |
uv | lv_yuv_plane_t | |
semi_planar | struct lv_yuv_buf_t | planar format with 2 plane |
struct
lv_image_dsc_t
Struct to describe a constant image resource. It's similar to lv_draw_buf_t, but the data is constant.
| Member | Type | Description |
|---|---|---|
header | lv_image_header_t | A header describing the basics of the image |
data_size | uint32_t | Size of the image in bytes |
data | const uint8_t * | Pointer to the data of the image |
reserved | const void * | A reserved field to make it has same size as lv_draw_buf_t |
reserved_2 | const void * | A reserved field to make it has same size as lv_draw_buf_t |
Used by 9 functions
lv_draw_eve_image_upload_image— paramimg_dsclv_draw_buf_from_image— paramimglv_draw_buf_to_image— paramimglv_image_buf_set_palette— paramdsclv_image_buf_free— paramdsclv_snapshot_free— paramdsclv_snapshot_take_to_buf— paramdsclv_x11_inputs_create— parammouse_imglv_image_set_bitmap_map_src— paramsrc
Typedefs
draw/lv_image_dsc.h:79typedef
lv_image_flags_t
typedef enum _lvimage_flags_t lv_image_flags_tUsed by 3 functions
lv_draw_buf_has_flag— paramflaglv_draw_buf_set_flag— paramflaglv_draw_buf_clear_flag— paramflag
Macros
LV_IMAGE_HEADER_MAGIC
#define LV_IMAGE_HEADER_MAGIC (0x19)Magic number for lvgl image, 9 means lvgl version 9 It must be neither a valid ASCII character nor larger than 0x80. See lv_image_src_get_type.
LV_IMAGE_FLAGS_USER_MASK
#define LV_IMAGE_FLAGS_USER_MASK (0xFF00)Flags reserved for user, lvgl won't use these bits.
Dependencies
How is this guide?
Last updated on