// js从base64数据中获取宽高 var image = new Image(); image.src = "data:image/png;base64," + base64数据; var imageWidth = image.width; var imageHeight = image.height;