Android: Immutable Bitmap and IllegalStateExpetion

I was trying to call Bitmap.setPixel(...) on a Bitmap. But all I got was an IllegalStateException. This was due to the Bitmap being immutable. I found a way to convert an immutable Bitmap into a mutable mitmap: Bitmap immutable = ...; Bitmap mutable = immutable.copy(immutable.getConfig(), true);Bitmap immutable = ...; Bitmap mutable = immutable.copy(immutable.getConfig(), true); That's Continue reading →