-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
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
压缩图片抛InvalidMarkException #19
Comments
必现么,可以把图片地址抛一下,我周末修复一下 |
应该和系统版本有关系。同一张图片。不同的系统调用BitmapFactory行为可能不同. |
我改了一下,在使用BitmapFactory获取宽高的时候,使用了裸流。没有使用优化的 //此处OOM
var bitmap = srcStream.openInternal().use { inputStream ->
BitmapFactory.decodeStream(inputStream, null, options)
?: throw IOException("decodeStream error")
} |
@IdioticMadman 我尝试 按照您所写的这样写,但是发现他srcStream 并没有openInternal方法,能否分享完整代码,被这个问题困扰很久 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
型号:魅族 PRO6
版本号:Flyme 7.3.0.0A
android版本 7.1.1
在这之后,markPos变成-1。想不通,为啥这个decodeStream会读取整个文件流导致超出marklimit。
这个文件流是一个大图片
The text was updated successfully, but these errors were encountered: