当前位置:网站首页>Mutual conversion of pictures in fluent uint8list format and pictures in file format
Mutual conversion of pictures in fluent uint8list format and pictures in file format
2022-07-01 10:48:00 【Dense breath】
file Format picture into Uint8List Format picture
Uint8List imageByte;
imageByte = await widget.image.readAsBytes();
// Get the callback Uint8List Format picture to File Format
SaveImage(Uint8List imageByte) async {
// Get the temporary directory
var tempDir = await getTemporaryDirectory();
// Generate file File format
var file =
await File('${
tempDir.path}/image_${
DateTime.now().millisecond}.jpg')
.create();
// Turn into file file
file.writeAsBytesSync(imageByte);
print("${file.path}");
setState(() {
path = file.path;
// turn(file);
_imageUint8=imageByte;
});
}
边栏推荐
- Want to open an account, is it safe to open an account of Huatai Securities online?
- 亿学学堂帮个人开的证券账户安全吗?是不是有套路
- Ask everyone in the group about the fact that the logminer scheme of flick Oracle CDC has been used to run stably in production
- 【Matytype】在CSDN博客中插入Mathtype行间与行内公式
- [.NET6]使用ML.NET+ONNX预训练模型整活B站经典《华强买瓜》
- 12款大家都在用的产品管理平台
- SQL Server列一相同的情况下,如何取列二的最大值,并重新生成表
- CCNP Part XII BGP (IV)
- Project0: Games
- Programmers want to go to state-owned enterprises? The technology is backward and the salary is low. I can't find a job after lying flat for several years
猜你喜欢

Who's still buying three squirrels

Infinite innovation in cloud "vision" | the 2022 Alibaba cloud live summit was officially launched

venv: venv 的目录结构

新品大揭秘!雅迪冠能 3 多元产品矩阵,满足全球用户出行需求

《数据安全法》出台一周年,看哪四大变化来袭?

Database experiment report (I)

Rising Stars in Plant Sciences (RSPS2022) Finalist科学演讲会(6.30晚9点)

价值1000毕业设计校园信息发布平台网站源码

How does MySQL copy table data from one database to another (two databases are not linked to the same database)

12款大家都在用的产品管理平台
随机推荐
MIT最新论文《对可解释特征的需求:动机和分类》:在机器学习模型的组成元素中建立可解释性
Matplotlib数据可视化基础
12 plateformes de gestion de produits utilisées par tout le monde
Infinite innovation in cloud "vision" | the 2022 Alibaba cloud live summit was officially launched
leetcode:111. Minimum depth of binary tree
Addition, deletion, modification and query of database
问下群里的各位,有使用flink oracle cdc的logminer方案,在生产上稳定运行的实际
新一代云原生数据库的设计与实践
[paper reading] trajectory guided control prediction for end to end autonomous driving: a simple yet strong Ba
Detailed explanation of linear regression in machine learning
零基础入行软件测试必看,10年测试老鸟的良心建议(共15条)
Kotlin 协程调度切换线程是时候解开真相了
Project0:小游戏
Recommend a JSON visualization tool artifact!
The exclusive collection of China lunar exploration project is limited to sale!
Daily mathematics serial 55: February 24
NC | intestinal cells and lactic acid bacteria work together to prevent Candida infection
内存泄漏定位工具之 valgrind 使用
价值1000毕业设计校园信息发布平台网站源码
442. duplicate data in array