【文件属性】:
文件名称:image-tools-master.zip
文件大小:8KB
文件格式:ZIP
更新时间:2023-03-24 11:10:33
uni-app 微信小程序 H5
pathToBase64
从图像路径转换为base64,uni-app、微信小程序和5+APP使用的路径不支持网络路径,如果是网络路径需要先使用下载API下载下来。
pathToBase64(path)
.then(base64 => {
console.log(base64)
})
.catch(error => {
console.error(error)
})
base64ToPath
base64ToPath(base64)
.then(path => {
console.log(path)
})
.catch(error => {
console.error(error)
})
【文件预览】:
image-tools-master
----index.js(5KB)
----package.json(659B)
----test()
--------image-tools-demo-uni-app()
----package-lock.json(400B)
----.npmignore(4B)
----.gitignore(22B)
----README.md(1KB)