The iPhone Game Background as Video or Animated Image?

穿精又带淫゛_ 提交于 2019-12-25 03:48:07

问题


I need to create a very short background animation for the entire iPhone screen. I am trying to figure out whether I should use a video or animate a series of PNG files. Does anybody know the advantage of using video as an app background instead of the series of PNG files being animated inside UIImageView? I heard that video can be compressed to really small size and will look better that animated PNGs. Thanks in advance.


回答1:


I really don't think using a video rather than a series of PNG is a good idea. You'll make your life more complicated for a few kilobytes saved, if you even save any.

It is of course highly dependent on what exactly you are trying to animate, and where you try to save space. For example, if you try to save memory in the binary and if you have your PNGs (already well compressed format) in a zip that you unzip on the fly, most similarities will be factored out by the zip algorithm. If you're trying to save space in memory during the game itself (not in the binary), then this doesn't count. However, loading up the video library binaries has a serious chance to clutter your memory more than the few PNGs will.

This project does the job with JPG, it should be very easy to change that with PNG ;)



来源:https://stackoverflow.com/questions/7231904/the-iphone-game-background-as-video-or-animated-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!