Possible Duplicate:
Bitmap byte-size after decoding?
Is there anyway so I can get the size of this Bitmap?I've tried to use getByteCount() but I can't use it?
Bitmap bitmap = BitmapFactory.decodeByteArray(decryptedData , 0, decryptedData .length); //decoding bytearrayoutputstream to bitmap
Any suggestions?
As you can see from the API, you can use
getWidth()
getHeight()
for the size of the Bitmap in pixels.
And if it is an array of bytes (8bit = 1byte) then just take decryptedData.length - offset
and you know how many bytes are in the Bitmap.
Or am I missing something here?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With