当前位置:网站首页>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)
}
边栏推荐
- Some behaviors of Apple developers that are prone to investigation
- 15 things to learn in a year of internship in famous enterprises, so you can avoid detours.
- 开发小技巧-图片资源管理
- How to gain profits from the operation of the points mall
- MT yolov6 training and testing
- PointNet/Pointnet++训练及测试
- Unity C# 网络学习(十二)——Protobuf生成协议
- mongoDB 持久化
- (III) encoder self attention mask
- 今天让你知道PMP考试通过率达97%,可信不可信
猜你喜欢
随机推荐
laravel 8 实现 订单表按月份水平分表
51 MCU interrupt and timer counter, based on Puzhong technology hc6800-esv2.0
First electric shock, so you are such a dragon lizard community | dragon lizard developer said that issue 8
51单片机中断与定时器计数器,基于普中科技HC6800-ESV2.0
成员内部类、静态内部类、局部内部类
P6776-[noi2020] surreal tree
15 things to learn in a year of internship in famous enterprises, so you can avoid detours.
【最全】PS各个版本下载安装及小试牛刀教程(PhotoShop CS3 ~~ PhotoShop 2022)
How to recite words in tables
P6772 [noi2020] gourmet (matrix fast power)
How to gain profits from the operation of the points mall
Operating system product key viewing method
Is it safe for the top ten securities companies to open accounts? Is it reliable?
Core development board & debugger
Official reply on issues related to the change of children's names after parents' divorce
2022 Season 6 perfect children's model Haikou competition area trial successfully concluded
Does the SQL server run with administrator privileges? Or run it as a normal user?
[most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)
General multiplier design, verilog code
Open3D 最远点采样(FPS)




![[untitled]](/img/6e/5dd5dcff89a74f7d367c9186a77268.png)



