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
Luban.Companion.with(ProcessLifecycleOwner.get()) .load(bitmap) .setOutPutDir(PathUtils.getExternalAppPicturesPath()) .useDownSample(true) //(可选)压缩算法 true采用邻近采样,否则使用双线性采样(纯文字图片效果绝佳) .format(Bitmap.CompressFormat.JPEG)//(可选)压缩后输出文件格式 支持 JPG,PNG,WEBP .ignoreBy(250) //(可选)期望大小,大小和图片呈现质量不能均衡所以压缩后不一定小于此值, .quality(100) //(可选)质量压缩系数 0-100 .compressObserver(new Function1<CompressResult<Bitmap, File>, Unit>() { @OverRide public Unit invoke(CompressResult<Bitmap, File> bitmapFileCompressResult) { bitmapFileCompressResult.setOnSuccess(new Function1<File, Unit>() { @OverRide public Unit invoke(File file) { return null; } }); return null; } }) .launch();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Luban.Companion.with(ProcessLifecycleOwner.get())
.load(bitmap)
.setOutPutDir(PathUtils.getExternalAppPicturesPath())
.useDownSample(true) //(可选)压缩算法 true采用邻近采样,否则使用双线性采样(纯文字图片效果绝佳)
.format(Bitmap.CompressFormat.JPEG)//(可选)压缩后输出文件格式 支持 JPG,PNG,WEBP
.ignoreBy(250) //(可选)期望大小,大小和图片呈现质量不能均衡所以压缩后不一定小于此值,
.quality(100) //(可选)质量压缩系数 0-100
.compressObserver(new Function1<CompressResult<Bitmap, File>, Unit>() {
@OverRide
public Unit invoke(CompressResult<Bitmap, File> bitmapFileCompressResult) {
bitmapFileCompressResult.setOnSuccess(new Function1<File, Unit>() {
@OverRide
public Unit invoke(File file) {
return null;
}
});
return null;
}
})
.launch();
The text was updated successfully, but these errors were encountered: