开发者

Is it possible to use PVRTVC textures in UIImages?

I'm running into some issues with having a lot o开发者_StackOverflow中文版f UIImages in memory, so I was wondering if there is any way of using PVRTC images instead of PNGs in UIImages.


No, it is limited to the OpenGL domain.

One technique that I have used in the past is to keep compressed PNGs in memory. As NSData instances. And then uncompress them on demand with UIImage's imageWithData: method.

It does depend on the 'complexity' of your images though. In my case the images were 'simple' and resulted in fine performance.

You can also look at my animation framework at Github:

http://github.com/st3fan/iphone-animation

It uses a similar technique but uses run-length encoding for the compressed images in memory. Results in larger data (but still way smaller than uncompressed) but decompresses really quickly compared to PNGs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜