Skip to content Skip to sidebar Skip to footer

Creating Bitmap From Canvas Java

SOLUTION Thanks to @ChandraSekhar's suggestions the issue was that I was passing in an Immutable Bitmap to the canvas constructor. The solution is to create a copy of it when using

Solution 1:

Bitmapone= Bitmap.createBitmap(bmp);

In the above code bmp is a Bitmap and you are creating another Bitmap object one from bmp.

Remove that line and try by changing

canvas.drawBitmap(one,0,0,null);

to

canvas.drawBitmap(bmp,0,0,null);

Solution 2:

Are you sure, the device on which you are running supports image size:655x655? Does bitmap get created?

Post a Comment for "Creating Bitmap From Canvas Java"