Today the image cache needs to calculate the bitmap of memory space, so the next bitmap about memory consumption of the API
1, Getrowbytes:since API level 1, used to calculate the number of bytes of memory occupied by each row of the bitmap.
2, Getbytecount:since API level 12, used to calculate the number of bytes of memory occupied by the bitmap.
Measured findings: getByteCount () = Getrowbytes () * GetHeight (), which means that the number of memory space occupied by the bitmap is equal to the number of spaces occupied by each row of the bitmap multiplied by the number of rows in the bitmap.
Because GetByteCount requires a high version of the API, the method above may be helpful for developers using lower versions when calculating the space occupied by bitmaps.
This article transferred from: http://blog.csdn.net/chtnj/article/details/8793761