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
作者你好,感谢分享。提Issues之前我已经把star点上了,嘻嘻~ 请教下一个Bitmap在不写入文件的情况下怎么使用luban进行压缩。如果可以的话,希望给一下示例代码。
The text was updated successfully, but these errors were encountered:
https://github.com/forJrking/XLuban 分支 dev
ByteArrayOutputStream baos = new ByteArrayOutputStream(); //compress方法是把一个位图写到一个OutputStream中,参数一是位图对象,二是格式,三是压缩的质量,四是输出流 newimage.compress(Bitmap.CompressFormat.JPEG, 100, baos); //输出流转成输入流 InputStream inputimage = new ByteArrayInputStream(baos.toByteArray()); Luban.with(this) .load(inputimage) .filter { true } .compressObserver { onSuccess = { } onStart = {} onCompletion = {} onError = { e, s -> } }.launch()
Sorry, something went wrong.
No branches or pull requests
作者你好,感谢分享。提Issues之前我已经把star点上了,嘻嘻~
请教下一个Bitmap在不写入文件的情况下怎么使用luban进行压缩。如果可以的话,希望给一下示例代码。
The text was updated successfully, but these errors were encountered: