我有一个 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;
这篇关于JS - 从base64代码中获取图片的宽高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!