tags:

views:

175

answers:

1

Hi!

How can I determine/calculate the byte size of a bitmap (after decoding with BitmapFactory)? I need to know how much memory space it occupies, because I'm doing memory caching/management in my app. (file size is not enough, since these are jpg/png files)

Thanks for any solutions!

Update: getRowBytes * getHeight might do the trick.. I'll implement it this way until someone comes up with something against it.

A: 

getRowBytes() * getHeight() seems to be working fine to me.