当前位置:网站首页>JS to obtain basic information about the width and height of an image or Base64
JS to obtain basic information about the width and height of an image or Base64
2022-06-29 09:02:00 【S Xiaoxiao s 4D smile】
let newImage = new Image()
// There will be src Pass in the picture address or base64
newImage.src = base64
// onload It's asynchronous , It can be used if it is encapsulated promise
newImage.onload = () => {
// Output picture information For example, you can get the width and height of the picture
console.log(newImage)
console.log(newImage.width)
console.log(newImage.height)
}
边栏推荐
- Verilog equivalent operator
- TypeScript 变量声明 —— 类型断言
- Huawei equipment is configured with medium-sized network WLAN basic services
- Leetcode (142) - circular linked list II
- ActiveMQ message component publish subscribe redelivery message redelivery
- 今年的网络安全“体检”你做了吗?
- verilog 等价操作符
- 二手交易平台碳减排,有了评估标准
- 成员内部类、静态内部类、局部内部类
- Transformer details
猜你喜欢

MQTT第二话 -- emqx高可用集群实现

sql server 用 administrator 权限运行吗?还是以普通用户运行呢?

io流的总结

TypeScript 變量聲明 —— 類型斷言

How to recite words in tables

How to recover data loss of USB flash disk memory card

Activemq消息组件发布订阅ReDelivery消息重新投递
![[most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)](/img/6d/4d8d90dd221de697f4c2ab5dcc7f96.png)
[most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)

Uber前安全主管面临欺诈指控 曾隐瞒数据泄露事件

Carbon emission reduction of second-hand trading platform, with assessment standards
随机推荐
sql server 用 administrator 权限运行吗?还是以普通用户运行呢?
Does the SQL server run with administrator privileges? Or run it as a normal user?
H5软键盘问题
Let's make a summary
宏,函数和内联函数
Mqtt second session -- emqx high availability cluster implementation
Scenario analysis of deadlock during MySQL insert
闭关修炼(二十二)session和cookie原理
Verilog shift operator
Verilog data type
mysql insert 时出现Deadlock死锁场景分析
[microservices openfeign] timeout of openfeign
[most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)
Using scan in redistemplate
晋升或汇报,你真的把事情讲清楚了吗?
Is the securities account of qiniu school really safe and reliable?
npm常用命令
闭关修炼(二十)如何做好单元测试
成员内部类、静态内部类、局部内部类
JS获取图片或base64的宽高等基本信息