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
获取到图标uri也是无法压缩的, 除非把文件复制到私有目录
private File compress(Context context, InputStreamProvider path) throws IOException { File result; File outFile = getImageCacheFile(context, Checker.SINGLE.extSuffix(path)); if (mRenameListener != null) { String filename = mRenameListener.rename(path.getPath()); outFile = getImageCustomFile(context, filename); } if (mCompressionPredicate != null) { if (mCompressionPredicate.apply(path.getPath()) && Checker.SINGLE.needCompress(mLeastCompressSize, path.getPath())) { result = new Engine(path, outFile, focusAlpha).compress(); } else { result = new File(path.getPath()); } } else { result = Checker.SINGLE.needCompress(mLeastCompressSize, path.getPath()) ? new Engine(path, outFile, focusAlpha).compress() : new File(path.getPath()); } return result; }
boolean needCompress(int leastCompressSize, String path) { if (leastCompressSize > 0) { File source = new File(path); return source.exists() && source.length() > (leastCompressSize << 10); } return true; }
非常希望作者能继续维护这个库.
The text was updated successfully, but these errors were encountered:
刚接入了,也发现了这个问题。这个判断文件是否存在的代码得改一下。 我在 InputStreamProvider 接口新增了一个方法,通过流获取大小。 @OverRide public long getInputStreamSize() throws IOException { return inputStream == null ? 0 : inputStream.available(); }
Sorry, something went wrong.
这个方法在哪具体怎么使用呀?
No branches or pull requests
获取到图标uri也是无法压缩的, 除非把文件复制到私有目录
非常希望作者能继续维护这个库.
The text was updated successfully, but these errors were encountered: