-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
压缩报错 #20
Comments
I/flutter (13143): |
好像ios也会报错 |
2021-02-21 22:43:43.968608+0800 Runner[622:41025] flutter: /private/var/mobile/Containers/Data/Application/B4A7A607-1366-4E04-8DA5-E0D4A3C82846/tmp/image_picker_FE272FA1-D43D-449B-AAEE-8FEAE5FC9719-622-0000002097230FF1.png |
确保有权限 可以试试 压缩存储在程序存放目录内的图片 在我这他工作的很好
|
我报的是 errno = 1
img_1664423934143.jpg 这个图片是不存在的,估计是压缩完后存放的文件名。 |
这个问题已经解决了,由于我开发的是desktop,所以需要文件系统的权限,
|
CompressObject compressObject = CompressObject(
imageFile: File('/storage/emulated/0/fluttera/349.jpg'),
path: '/storage/emulated/0/fluttera/15882605447.jpg',
quality: 80,
step: 9,
mode: CompressMode.AUTO
);
var path =await (Luban.compressImage(compressObject));
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Exception: FileSystemException: Cannot open file, path = '/storage/emulated/0/fluttera/15882605447.jpg/img_1588261036457.jpg' (OS Error: No such file or directory, errno = 2)
用的最新版的flutter 和Dart ,图片是本地已经存在的,不知道为什么会提示找不到 报错
The text was updated successfully, but these errors were encountered: