image - 如何在 Flutter Web 程序中压缩图像
问题描述
我尝试在颤动的网络程序中上传图像,但它的大小太大。裁剪后,问题无法解决。图片的数据格式为Uint8List。
解决方案
Just using new Plugin name : File_support url : https://pub.dev/packages/file_support
This file support plugin is good when I used first time.It drastically reduce file size 2 mb to 70 kb.
File compressimage = await FileSupport().compressImage(<Your image file>);
After this code convert File object to Uint8 then upload file.
推荐阅读
- python - TypeError:列表索引必须是整数,而不是浮点数(Python2)
- mysql - SQL查询IN子句:传递列表时如何转义特殊字符
- python - Python 命令提示符中的制表符/缩进错误
- git - 在父存储库上 git pull 后合并子模块更改
- firemonkey - Firemonkey tEdit OnPaint
- c# - C# 中 XML 文档注释的替代方案
- css - 调整父div大小时如何修复第二行浮动子div的顺序
- javascript - 在 Reactjs 中将 Stripe Pay 按钮更改为图像
- php - 更新表单中的数据库字段
- java - Drools:同一案例的规则触发两次