We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
华为mate30Pro,鸿蒙系统 v3.10.6 已经设置targetSdk = 29和android:requestLegacyExternalStorage="true"
public class ImageCompressEngine implements CompressFileEngine { @Override public void onStartCompress(Context context, ArrayList<Uri> source, OnKeyValueResultCallbackListener call) { Luban.with(context).load(source).ignoreBy(500) .filter(path -> PictureMimeType.isUrlHasImage(path) && !PictureMimeType.isHasHttp(path)) .setCompressListener(new OnNewCompressListener() { @Override public void onStart() { } @Override public void onSuccess(String source, File compressFile) { LogUtils.i("localMediaCompress",source); if (call != null) { call.onCallback(source, compressFile.getAbsolutePath()); } } @Override public void onError(String source, Throwable e) { LogUtils.i("localMediaCompress", source); LogUtils.i("localMediaCompress", e.getMessage()); if (call != null) { call.onCallback(source, null); } } }).launch(); } }
稍微大点的图片,2-3M的,手机拍照的,就会loading很长时间,一张差不多2分钟左右吧,且大几率会crash
The text was updated successfully, but these errors were encountered:
有具体的 图片和 crash 吗,优化了一些Crash
Sorry, something went wrong.
@tianshaokai https://github.com/tianshaokai/Luban 这个是你单独维护的一版吗
@zhaoxiuyu 是的 转换了androidx, 修改了部分空指针,打算维护一下这个库,供大家使用
private File compress(Context context, InputStreamProvider path) throws IOException { File var3; try { var3 = this.compressReal(context, path); } finally { path.close(); }
return var3; }
你这里只是做了close操作,并没有做catch操作,如果发生nullPointerException还是会导致应用崩溃的吧
No branches or pull requests
华为mate30Pro,鸿蒙系统
v3.10.6
已经设置targetSdk = 29和android:requestLegacyExternalStorage="true"
稍微大点的图片,2-3M的,手机拍照的,就会loading很长时间,一张差不多2分钟左右吧,且大几率会crash
The text was updated successfully, but these errors were encountered: