开发者

iOS performance difference between big-dimension png image vs big-filesize png image

My storybook app has a mountainBackground.png. On top will be some animals that have small animations. The animals in its png will be surrounded by transparency so I can overlay it cleanly on top of the mountain.

To save myself time and headache, I would prefer to dump my animal pictures from Adobe Illustrator with the same dimensions as my mountainBackground.png (like giraffe1.png and lion1.png) instead of doing a "wrapped" dimension (like giraffe2.png and lion2.png)

The file size between full and wrapped images are not that big. I don't particularly care too much abou开发者_开发知识库t 70kb vs 30kb.

The question is.. Will iPad/iPhone/iPod have performance problems (speed, processing, memory etc) when displaying big (in dimensions, not in size) multiple pictures? How about 10 animals? So 10 animals that are 2048 x 2048 dimensions but small in file size. How about 10 animals with some small animations (moving, panning, zooming, stretching, flipping images, etc).

full vs wrapped

Please click link for pictures. Unfortunately, I cant post images yet.


Yes, unfortunately.

A rendered image will take up something like pixel_width * pixel_height * 4 bytes of memory no matter their contents, since they are uncompressed when used on the screen.

There is also a limit (or at least Apple used to warn about) using images larger than 1024 x 1024.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜