[−][src]Function lvgl::widgets::img::decoder_open
pub fn decoder_open(
dsc: *mut lv_img_decoder_dsc_t,
src: *const c_void,
color: lv_color_t
) -> MynewtResult<lv_res_t>
Open an image.
Try the created image decoder one by one. Once one is able to open the image that decoder is save in dsc
dsc
: describe a decoding session. Simply a pointer to anlv_img_decoder_dsc_t
variable.src
: the image source. Can be
- File name: E.g. "S:folder/img1.png" (The drivers needs to registered via
lv_fs_add_drv()
) - Variable: Pointer to an
lv_img_dsc_t
variable - Symbol: E.g.
LV_SYMBOL_OK
color
: The color of the image withLV_IMG_CF_ALPHA_...
Return: LV_RES_OK: opened the image.dsc->img_data
anddsc->header
are set. LV_RES_INV: none of the registered image decoders were able to open the image.