lv_image_dsc.h

API reference for lv_image_dsc.h

Report on GitHub

Enums

_lvimage_flags_t

NameValueDescription
LV_IMAGE_FLAGS_PREMULTIPLIED0x0001For 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_COMPRESSED0x0008The 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_ALLOCATED0x0010The image is allocated from heap, thus should be freed after use.
LV_IMAGE_FLAGS_MODIFIABLE0x0020If 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_DRAW0x0040The image has custom drawing methods.
LV_IMAGE_FLAGS_USER10x0100Flags reserved for user, lvgl won't use these bits.
LV_IMAGE_FLAGS_USER20x0200
LV_IMAGE_FLAGS_USER30x0400
LV_IMAGE_FLAGS_USER40x0800
LV_IMAGE_FLAGS_USER50x1000
LV_IMAGE_FLAGS_USER60x2000
LV_IMAGE_FLAGS_USER70x4000
LV_IMAGE_FLAGS_USER80x8000

lv_image_compress_t

NameValueDescription
LV_IMAGE_COMPRESS_NONE0
LV_IMAGE_COMPRESS_RLELVGL custom RLE compression
LV_IMAGE_COMPRESS_LZ4

Structs

struct

lv_image_header_t

MemberTypeDescription
magicuint32_tMagic number. Must be LV_IMAGE_HEADER_MAGIC
cfuint32_tColor format: See lv_color_format_t
flagsuint32_tImage flags, see lv_image_flags_t
wuint32_t
huint32_t
strideuint32_tNumber of bytes in a row
reserved_2uint32_tReserved to be used later
Used by 3 functions
  • lv_image_decoder_get_info — param header
  • lv_nanovg_image_cache_get_handle — param header
  • lv_bin_decoder_info — param header
struct

lv_yuv_plane_t

MemberTypeDescription
bufvoid *
strideuint32_tNumber of bytes in a row
struct

lv_yuv_buf_t

MemberTypeDescription
yuvlv_yuv_plane_tpacked format
ylv_yuv_plane_t
ulv_yuv_plane_t
vlv_yuv_plane_t
planarstruct lv_yuv_buf_tplanar format with 3 plane
uvlv_yuv_plane_t
semi_planarstruct lv_yuv_buf_tplanar 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.

MemberTypeDescription
headerlv_image_header_tA header describing the basics of the image
data_sizeuint32_tSize of the image in bytes
dataconst uint8_t *Pointer to the data of the image
reservedconst void *A reserved field to make it has same size as lv_draw_buf_t
reserved_2const 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 — param img_dsc
  • lv_draw_buf_from_image — param img
  • lv_draw_buf_to_image — param img
  • lv_image_buf_set_palette — param dsc
  • lv_image_buf_free — param dsc
  • lv_snapshot_free — param dsc
  • lv_snapshot_take_to_buf — param dsc
  • lv_x11_inputs_create — param mouse_img
  • lv_image_set_bitmap_map_src — param src

Typedefs

lv_image_flags_t

 
typedef enum _lvimage_flags_t lv_image_flags_t
Used by 3 functions
  • lv_draw_buf_has_flag — param flag
  • lv_draw_buf_set_flag — param flag
  • lv_draw_buf_clear_flag — param flag

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

Indirect dependencies

How is this guide?

Last updated on

On this page