Open merlinJie opened 8 years ago
+1.
Happens when trying to created new bitmap and failed to do that, because of OOM. So in some cases scaleBitmap is null, but we pass it to constructor of Canvas and so we receive this NPE
@zetbaitsu Hi, could you, please, fix it somehow.
this is also my question,can you tell me how to fix it?
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isMutable()' on a null object reference at android.graphics.Canvas.(Canvas.java:149)
at id.zelory.compressor.ImageUtil.getScaledBitmap(SourceFile:94)
at id.zelory.compressor.Compressor.compressToBitmap(SourceFile:47)