JS - 从 base64 代码中获取图像宽度和高度

问题描述:

我有一个 base64 img 编码,你可以在这里找到.我怎样才能得到它的高度和宽度?

I have a base64 img encoded that you can find here. How can I get the height and the width of it?

var i = new Image(); 

i.onload = function(){
 alert( i.width+", "+i.height );
};

i.src = imageData;