//图片流作为参数传递 获取图片尺寸大小提示function getImgTip(bdImgBase) {(async () => {let size = await getImageSize(bdImgBase);$('#imgTip').html("当前图片宽高尺寸为[" + size.width + "px * " + size.height + "px]");})();}//参数为二进制图片流function getImageSize(url) {return new Promise(function (resolve, reject) {let image = new Image();image.onload = function () {resolve({width: image.width,height: image.height});};image.onerror = function () {reject(new Error('error'));};image.src = url;});}