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

大图OOM #72

Open
nxnyk opened this issue Oct 29, 2021 · 1 comment
Open

大图OOM #72

nxnyk opened this issue Oct 29, 2021 · 1 comment

Comments

@nxnyk
Copy link

nxnyk commented Oct 29, 2021

Canvas: trying to draw too large bitmap. 现在的手机自带相机拍的照片动辄10M 20M 的,选择10M的图片,进入剪裁页面就会oom了,加了个try_catch,虽然不会闪退了,但是剪裁页面是黑色的!

@donkingliang
Copy link
Owner

你可以自己修改一下ImageUtil.decodeSampledBitmapFromFile方法的,可能是获取的图片采样缩略图还是太大了,改小一点,会节省内存。

image

你也可以断点调试一下,看是在哪里导致的oom,然后自己修改一下参或者采样方法

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

2 participants