How to check if a Bitmap is empty (blank) on Android
问题 How can I check if a Bitmap object is completely blank, i.e. all its pixels are transparent, without a x-y loop on every pixel? 回答1: 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 } 回答2: This is not an efficient way to solve the problem but it does its purpose cause I didn't find a