当前位置:网站首页>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)
}
边栏推荐
- Operating system product key viewing method
- DevOps到底是什么意思?
- js for in循环 for of循环的区别以及用法
- How to recover data loss of USB flash disk memory card
- Transformer details
- Verilog shift operator
- [most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)
- Network learning of pointnet
- CDGA|交通行业做好数字化转型的核心是什么?
- La finale de la zone de compétition Hefei de la sixième saison 2022 a été couronnée de succès.
猜你喜欢

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

mysql insert 时出现Deadlock死锁场景分析

New paid Tarot calculation source code (with building tutorial)

Core development board & debugger

The @dynamicmemberlookup and callasfunction features in swift implement the object transparent proxy function

2022春夏系列 KOREANO ESSENTIAL重塑时装生命力

DevOps到底是什么意思?

Open3D 最远点采样(FPS)

TypeScript 变量声明 —— 类型断言

mongoDB 持久化
随机推荐
工作好多年,回忆人生--高中三年
对比HomeKit、米家,智汀家庭云版有哪些场景化的体验
Product manager certification enrollment brochure (NPDP) in July 2022
[untitled]
积分商城运营要如何做才能获取到利润
闭关修炼(二十四)浅入了解跨域问题
航芯开发板&调试器
How to recite words in tables
Matlab usage
Open3D 最远点采样(FPS)
闭关修炼(二十五)基础web安全
搭建开源物联网平台教程
DevOps到底是什么意思?
手写VirtualDOM
MYSQL虚拟列
2022 spring summer collection koreano essential reshapes the vitality of fashion
Memoirs of actual combat: breaking the border from webshell
Transformer details
Typescript variable declaration - type assertion
TypeScript 变量声明 —— 类型断言