Skip to content
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

选择太大的照片会直接报错 #55

Open
wkbin opened this issue Apr 22, 2020 · 2 comments
Open

选择太大的照片会直接报错 #55

wkbin opened this issue Apr 22, 2020 · 2 comments

Comments

@wkbin
Copy link

wkbin commented Apr 22, 2020

2020-04-22 11:42:29.101 7348-7348/com.pddecode.lianmodu E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.pddecode.lianmodu, PID: 7348
java.lang.RuntimeException: Canvas: trying to draw too large(256872448bytes) bitmap.
at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:280)
at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:88)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:548)
at android.widget.ImageView.onDraw(ImageView.java:1434)
at com.donkingliang.imageselector.view.ClipImageView.onDraw(ClipImageView.java:124)
at android.view.View.draw(View.java:21473)
at android.view.View.updateDisplayListIfDirty(View.java:20350)
at android.view.View.draw(View.java:21205)
at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
at android.view.View.draw(View.java:21476)
at android.view.View.updateDisplayListIfDirty(View.java:20350)
at android.view.View.draw(View.java:21205)
at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)

@donkingliang
Copy link
Owner

图片剪切页面是有做图片采样压缩的,但是为了缩放后的清晰度,我用图片宽高的最小边做采样比例的计算。所以如果你的图片的比很大的话,压缩后的图片可能依然很大。

@nxnyk
Copy link

nxnyk commented Oct 29, 2021

同遇到该问题,怎么解决呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants