How to check if a Bitmap is empty (blank) on Android
You can check your Bitmap instance (in the example myBitmap
) against an empty one with:
Bitmap emptyBitmap = Bitmap.createBitmap(myBitmap.getWidth(), myBitmap.getHeight(), myBitmap.getConfig());
if (myBitmap.sameAs(emptyBitmap)) {
// myBitmap is empty/blank
}