/* Get information about an image. Try the created image decoder one by one. Once one is able to get info that info will be used.  */
lv_res_t lv_img_decoder_get_info(const void *src, lv_img_header_t *header)
/* Get information about an image. Try the created image decoder one by one. Once one is able to get info that info will be used.  */
lv_res_t lv_img_decoder_get_info(const void *src, lv_img_header_t *header)
{
    lv_memset_00(header, sizeof(lv_img_header_t));
    if(src == NULL) return LV_RES_INV;
    lv_img_src_t src_type = lv_img_src_get_type(src);
    if(src_type == LV_IMG_SRC_VARIABLE) {
        const lv_img_dsc_t * img_dsc = src;
        if(img_dsc->data == NULL) return LV_RES_INV;
    }
    lv_res_t res = LV_RES_INV;
    lv_img_decoder_t * d;
    _LV_LL_READ(&LV_GC_ROOT(_lv_img_decoder_ll), d) {
        if(d->info_cb) {
            res = d->info_cb(d, src, header);
            if(res == LV_RES_OK) break;
        }
    }
    return res;
}