-1
I learned from a stack overflow post that the memory required to display an image and the image size is equal to
4 * image dimensions
I have some 800x800 images and I see that its size is about a hundred KB, which I think is quite small. But according to the formula above, it needs more than 2MB to display it!
The SO post says that because the bitmap is using ARGB colors, each pixel requires 4 bytes of storage space. So that's why the formula is 4 * image dimensions. But I see that only 100KB of space is required to store the image!
Does the computer use a different method to store the image? Does 1 pixel still needs 4B to be stored? How is this happening?
And where do you see that its size is about a hundred kB? – Run CMD – 2015-11-23T13:20:33.207
In its properties window – Sweeper – 2015-11-23T13:21:25.900
You mean, on disk? – Run CMD – 2015-11-23T13:21:58.380
It's a fact that the answer you quote gives a bad recommendation. RGB888 is you first choice if you don't need transparency, not ARGB. Especially on a mobile device. It saves 25% memory as compared to ARGB and also, if you stack Android
View
s, adding transparency will slow down things. – Run CMD – 2015-11-23T14:27:30.643