开发者

Fullscreen iPhone animation from PNG

I need in animation of sequence of more PNG files (300 png files and size is 320x480). I've try make it with 12 fps, but sometime iPhone 3g have lags... 3gs working fine. I think 2g working with lags always.

I've use one UIImageView and loading images in NStimer callback by UIImage:imageWithContentOfFile.

May be this is not best way to animation png files ?

note: previously i've used ImageOptim to pack (or strip ??) all my images (from 20% to 80% of size strip).

开发者_如何学C

regards,


Using an image view for full-screen animation is really not going to go well, regardless of how you compress your images. Make the frames into a video file and use MPMoviePlayerController.


The way that I found is use JPG files it works really faster. And we do not need PNG if fullscreen animation (tested on iPhone and iPad).


If you can afford some sort of delay when the apps start, you may cache some images (say, storing them in NSMutableArray) before displaying them. This assume the bottleneck is in the imageWithContentOfFile call.

One more option is to keep imaging loading in a NSOperation (thread in its simpler form).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜