Skip to content
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.

Extension method for checking if the bitmap is empty #568

Open
kevalpatel2106 opened this issue Jun 7, 2018 · 2 comments
Open

Extension method for checking if the bitmap is empty #568

kevalpatel2106 opened this issue Jun 7, 2018 · 2 comments

Comments

@kevalpatel2106
Copy link

I think it would be great if bitmap has an extension for checking if the bitmap is empty or not based on the byte count.

if (bitmap.isEmpty()){
   // Did not read bitmap correctly.
}
@JakeWharton
Copy link
Contributor

Why based on byte count and not size?

@kevalpatel2106
Copy link
Author

I didn't use size because createBitmap doesn't allow to set the bitmap dimensions to zero. So there is no point of checking the size of the bitmap to see if the bitmap is of 0 * 0 size.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants