let img=new Image()
img.src='1.png'
//或img.src=flatImg:'data:image/png;base64,'+response.result.image
img.onload=function(){
img.width //
img.height
//否则宽高皆为0
}
let img=new Image()
img.src='1.png'
//或img.src=flatImg:'data:image/png;base64,'+response.result.image
img.onload=function(){
img.width //
img.height
//否则宽高皆为0
}
本文标题:获取图片的宽高
本文链接:https://www.haomeiwen.com/subject/smnqfqtx.html
网友评论