Is it possible to use PVRTVC textures in UIImages?

1.2k Views Asked by At

I'm running into some issues with having a lot of UIImages in memory, so I was wondering if there is any way of using PVRTC images instead of PNGs in UIImages.

1

There are 1 best solutions below

1
On BEST ANSWER

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.