lv_bin_decoder.h

Functions

void lv_bin_decoder_init(void)

Initialize the binary image decoder module

lv_result_t lv_bin_decoder_info(lv_image_decoder_t *decoder, const void *src, lv_image_header_t *header)

Get info about a lvgl binary image

Parameters:
  • decoder -- the decoder where this function belongs

  • src -- the image source: pointer to an lv_image_dsc_t variable, a file path or a symbol

  • header -- store the image data here

Returns:

LV_RESULT_OK: the info is successfully stored in header; LV_RESULT_INVALID: unknown format or other error.

lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area)
lv_result_t lv_bin_decoder_open(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc)

Open a lvgl binary image

Parameters:
  • decoder -- the decoder where this function belongs

  • dsc -- pointer to decoder descriptor. src, style are already initialized in it.

Returns:

LV_RESULT_OK: the info is successfully stored in header; LV_RESULT_INVALID: unknown format or other error.

void lv_bin_decoder_close(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc)

Close the pending decoding. Free resources etc.

Parameters:
  • decoder -- pointer to the decoder the function associated with

  • dsc -- pointer to decoder descriptor