How to check if a bitmap (or canvas) is empty in Android -
i have implement function return me boolean if bitmap or canvas empty in android.
how can ?
i have tried solution, doesn't work:
bitmap emptybitmap = bitmap.createbitmap(mybitmap.getwidth(), mybitmap.getheight(), mybitmap.getconfig()); if (mybitmap.sameas(emptybitmap)) { // mybitmap empty/blank }
how check if bitmap empty (blank) on android
another solution have considerated is:
fastest way check if image white or transparent
but can't check every pixels, spend time in operation
sorry it's late apparently best way create bitmap , check if it's same boolean res (bitmap.sameas())
Comments
Post a Comment