ImageIO causes more memory to be allocated than the size of the images
I have 5 UIimageViews which display .png files, each max 200kb, but ImageIO allocates around and average of 1.3 mb for each. totaling 开发者_开发问答7.3 mb for the view when loaded.
What is causing this to happen?
I have another class with same amount of images and that allocates only 2 mb max.
As far as I understand images are stored in memory in raw RGBA data (red, green, blue, alpha). So load you load png/jpeg (both compressed formats) iPhone uses 4 bytes per pixel. So 100x100 image will be 40000 bytes. Waht size are your images?
精彩评论