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.

what changed between v1.8 and v1.1 result in the method `Bitmap#isMutable` return false?

See original GitHub issue

Following code:when downloading image with imagepipeline

CloseableBitmap closeableBitmap = (CloseableBitmap) imageReference.get();
Bitmap bitmap = closeableBitmap.getUnderlyingBitmap();
GLog.d(TAG, "isMutable:" + bitmap.isMutable());

why return false? in previous version here return true? what changed?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
qhyuan1992commented, Jul 10, 2018

@oprisnik The issue caused by different size of reused bitmap is similar to the issue Android Oreo - can’t load some PNG - BitmapFactory: bitmap marked for reuse (3944728 bytes) can’t fit new bitmap (7889456 bytes). A immutable bitmap returned also result from the change for issue #2021. so I close the issue

0reactions
qhyuan1992commented, Jul 9, 2018

oh, i understand. the question also means what if i decode a png image with alhpa using RGB_565? it could reuse bitmap in Fresco, so we allocate a size of width * height * (size of RGB_565, also 2). in native , it really change to ARGB_8888 because of having alpha, although we use a colortype of RGB_565. it need width * height * (size of ARGB_8888, also 4). so the crash happend

BitmapFactory: bitmap marked for reuse (524288 bytes) can't fit new bitmap (1048576 bytes)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Diff - platform/frameworks/layoutlib - Google Git
-20,13 +20,18 @@ import com.android.ide.common.rendering.api. ... Accumulator to store the value of the 1+ constants. int result = 0; boolean found = false; ......
Read more >
PixelCamera/ImageSaver.java at master - GitHub
If is_hdr==true, this should be 1 or 3 images, and the images are combined/converted to a ... If is_hdr==false, then multiple images are...
Read more >
PackageManager - Android Developers
org.xmlpull.v1.sax2 ... isLowRamDevice() method returns false. ... but asynchronously persists the package manager state after returning from the call, ...
Read more >
How to show Animated GIF image in android application?
Open build.gradle (Module: app); put in dependencies: compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.+'.
Read more >
PackageManager - Android SDK | Android Developers
Added in API level 1 ... This method was deprecated in API level 8. ... Map from the current package names in use...
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