lv_image_decoder_private.h
API reference for lv_image_decoder_private.h
See Also: Public APIThis is the private implementation. See the public header for the stable interface.lv_image_decoder.h
Summary
Functions
lv_image_decoder_init
Initialize the image decoder module
void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count)lv_image_decoder_deinit
Deinitialize the image decoder module
void lv_image_decoder_deinit(void)Structs
struct
_lv_image_decoder_args_t
Image decoder args. It determines how to decoder an image, e.g. whether to premultiply the alpha or not. It should be passed to lv_img_decoder_open() function. If NULL is provided, default args are used.
Default args: all field are zero or false.
| Member | Type | Description |
|---|---|---|
stride_align | bool | Whether stride should be aligned |
premultiply | bool | Whether image should be premultiplied or not after decoding |
no_cache | bool | When set, decoded image won't be put to cache, and decoder open will also ignore cache. |
use_indexed | bool | Decoded indexed image as is. Convert to ARGB8888 if false. |
flush_cache | bool | Whether to flush the data cache after decoding |
struct
_lv_image_decoder_t
| Member | Type | Description |
|---|---|---|
info_cb | lv_image_decoder_info_f_t | |
open_cb | lv_image_decoder_open_f_t | |
get_area_cb | lv_image_decoder_get_area_cb_t | |
close_cb | lv_image_decoder_close_f_t | |
custom_draw_cb | lv_image_decoder_custom_draw_t | |
name | const char * | |
user_data | void * |
struct
_lv_image_cache_data_t
| Member | Type | Description |
|---|---|---|
slot | lv_cache_slot_size_t | |
src | const void * | |
src_type | lv_image_src_t | |
decoded | const lv_draw_buf_t * | |
decoder | const lv_image_decoder_t * | |
user_data | void * |
struct
_lv_image_header_cache_data_t
| Member | Type | Description |
|---|---|---|
src | const void * | |
src_type | lv_image_src_t | |
header | lv_image_header_t | |
decoder | lv_image_decoder_t * |
struct
_lv_image_decoder_dsc_t
Describe an image decoding session. Stores data about the decoding
| Member | Type | Description |
|---|---|---|
decoder | lv_image_decoder_t * | The decoder which was able to open the image source |
args | lv_image_decoder_args_t | A copy of parameters of how this image is decoded |
src | const void * | The image source. A file path like "S:my_img.png" or pointer to an lv_image_dsc_t variable |
src_type | lv_image_src_t | Type of the source: file or variable. Can be set in open function if required |
file | lv_fs_file_t | |
header | lv_image_header_t | Info about the opened image: color format, size, etc. MUST be set in open function |
decoded | const lv_draw_buf_t * | Pointer to a draw buffer where the image's data (pixels) are stored in a decoded, plain format. MUST be set in open or get_area_cbfunction |
palette | const lv_color32_t * | |
palette_size | uint32_t | |
time_to_open | uint32_t | How much time did it take to open the image. [ms] If not set lv_image_cache will measure and set the time to open |
error_msg | const char * | A text to display instead of the image when the image can't be opened. Can be set in open function or set NULL. |
cache | lv_cache_t * | |
cache_entry | lv_cache_entry_t * | Point to cache entry information |
user_data | void * | Store any custom data here is required |
Dependencies
Indirect dependencies
lv_area.hlv_assert.hlv_cache_class.hlv_cache_entry.hlv_cache_instance.hlv_cache_lru_ll.hlv_cache_lru_rb.hlv_cache_private.hlv_cache_sc_da.hlv_color.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.hlv_draw_buf.hlv_fs.hlv_image_cache.hlv_image_dsc.hlv_image_header_cache.hlv_log.hlv_math.hlv_mem.hlv_os.hlv_os_private.hlv_palette.hlv_pthread.hlv_string.hlv_types.h
How is this guide?
Last updated on