当前位置:网站首页>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;
});
}
边栏推荐
- 【Laravel 】faker数据填充详解
- 442. duplicate data in array
- leetcode:111. Minimum depth of binary tree
- 【MPC】②quadprog求解正定、半正定、负定二次规划
- 12款大家都在用的產品管理平臺
- Rising stars in Plant Sciences (rsps2022) final Science Lecture (6.30 pm)
- 使用强大的DBPack处理分布式事务(PHP使用教程)
- The Lantern Festival is held on the fifteenth day of the first month, and the Lantern Festival begins to celebrate the reunion
- Uncover the secrets of new products! Yadi Guanneng 3 multi product matrix to meet the travel needs of global users
- 数据库的增删改查问题
猜你喜欢

建议收藏 | 在openGauss上遇到慢SQL该怎么办?

商城小程序源码开源版-可二开

What should I learn in the zero foundation entry test? It's the most comprehensive. Just learn from it

机器学习之线性回归详解

Matplotlib data visualization Foundation
![[encounter Django] - (II) database configuration](/img/23/aed472757f7e238a146b043c0405d7.png)
[encounter Django] - (II) database configuration

Have you learned the necessary global exception handler for the project
![[.net6] use ml.net+onnx pre training model to liven the classic](/img/b3/b117481fba7257453011e4cdb1eaaa.png)
[.net6] use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B

Recommend a JSON visualization tool artifact!

The list of winners of the digital collection of "century master" was announced
随机推荐
Crawler (2) - requests (1) | deep parsing of requests module
数字藏品平台搭建需要注意哪些法律风险及资质?
[paper reading] trajectory guided control prediction for end to end autonomous driving: a simple yet strong Ba
【Laravel 】faker数据填充详解
About database: how to avoid deadlock in gbase 8s
CRC 校驗
[encounter Django] - (II) database configuration
华为HMS Core携手超图为三维GIS注入新动能
Does anyone know why? The table structure is the source table MySQL CDC that has just been directly copied
亿学学堂帮个人开的证券账户安全吗?是不是有套路
CRC verification
程序员都想去国企?技术落后薪资低,躺平几年出来都找不到工作...
云上“视界” 创新无限 | 2022阿里云直播峰会正式上线
106. 从中序与后序遍历序列构造二叉树
[.NET6]使用ML.NET+ONNX预训练模型整活B站经典《华强买瓜》
[.net6] use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B
Who's still buying three squirrels
MySQL common commands
Project0: Games
Database experiment report (I)