java - 如何使用 React js 将 Base64 字符串的图像转换为 blob?
问题描述
我正在使用 react-webcam 来捕获图片。我在 Base 64 中获取了捕获的图像。我想将其转换为 Blob
capture = () => {
const imageSrc = this.webcam.getScreenshot();
Blob imageFile = someFunction(imageSrc) // want this code
this.setState({
imgsource: imageFile
});
};
解决方案
有很多方法可以解决这个问题。您可以查看以下解决方案:
推荐阅读
- python - 如何通过 api 在谷歌搜索控制台中下载核心网络重要报告背后的数据?
- amazon-web-services - 与 ECS 和容量提供商一起使用 AWS 管理气流
- angular - Angular - 从数组更改中刷新垫表
- javascript - 循环浏览图像列表并随机显示一个并短暂闪烁
- fortify - 通过 Rest API 获取 Fortify SSC 中的可执行代码行数和总代码行数
- angular - TypeError:无法读取离子中未定义的属性“firstName”
- google-app-engine - GAE、HTTP/3 和自定义域的问题
- google-sheets - 在 Google 表格中的整行上应用复杂公式
- node.js - 突然间,在我的登录时未定义密码 - nodejs
- c++ - 如何更改文本文件中序列的字母?