crazecoder / flutter_luban

An image compress package like Luban for Dart
BSD 3-Clause "New" or "Revised" License
214 stars 56 forks source link

无法打开图片文件 #10

Closed ZhouZhiMin1 closed 5 years ago

ZhouZhiMin1 commented 5 years ago

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Exception: FileSystemException: Cannot open file, path = '/data/user/0/com.example.im_flutter/cache/Android.jpg/img_1571561019173.jpg' (OS Error: No such file or directory, errno = 2)

ZhouZhiMin1 commented 5 years ago

print("图片原始大小:${image.length()}"); print("图片输出路径:$outPath"); CompressObject object = CompressObject( imageFile: image, path: outPath, quality: 85, step: 9, mode: CompressMode.LARGE2SMALL ); String path = await Luban.compressImage(object);

ZhouZhiMin1 commented 5 years ago

我找到原因了 我的输出路径搞错了