question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Canvas: trying to draw too large bitmap

See original GitHub issue

Hello !

First, thank you for your awesome library !

I face to a Runtime Exception : Canvas trying to draw a too large Bitmap. Below the stack trace I’ve got :

Fatal Exception: java.lang.RuntimeException: Canvas: trying to draw too large(147000000bytes) bitmap. at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229) at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:98) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545) at android.widget.ImageView.onDraw(ImageView.java:1360) at com.otaliastudios.zoom.ZoomImageView.onDraw(ZoomImageView.kt:120) at android.view.View.draw(View.java:20234) at android.view.View.updateDisplayListIfDirty(View.java:19109) at android.view.View.draw(View.java:19962) at android.view.ViewGroup.drawChild(ViewGroup.java:4337) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4114) at android.view.View.updateDisplayListIfDirty(View.java:19100) at android.view.View.draw(View.java:19962) at android.view.ViewGroup.drawChild(ViewGroup.java:4337) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4114)

Thank you again for your work !

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
KevynBctcommented, Nov 20, 2019

Hello, I’ve found the problem, and it isn’t caused by ZoomImageView ! Sorry for this wrong issue, everything is working well ! I close that wrong issue

0reactions
KevynBctcommented, Aug 29, 2020

@looooker Hi, I just use a low res drawable, it seems my drawables are too high, even in a ImageView

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Canvas: drawing too large bitmap - Stack Overflow
The solution is to move the image from drawable/ folder to drawable-xxhdpi/ folder, as also others have mentioned. But it is important to...
Read more >
Canvas: trying to draw too large - MIT App Inventor Community
If I had to guess, I think your problem is that you are trying to draw a file that is either way too...
Read more >
Canvas: trying to draw too large(122680608bytes) bitmap.
Right click res folder -> select "Android Resource Directory" -> Select resource type as drawable -> select "Density" from available qualifiers ...
Read more >
Canvas: trying to draw too large bitmap. · Issue #3775 - GitHub
The simplest fix is to either use a more proportional image, or to explicitly set a more reasonable downsample strategy (FIT_CENTER, or even ......
Read more >
trying to draw too large bitmap. after migrating to version 4
RuntimeException: Canvas: trying to draw too large bitmap. after migrating to version 4 · Francesco Noya · Sam Judd · Francesco Noya ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found