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.
Asked
Active
Viewed 1,273 times
1 Answers
2
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.

Stefan Arentz
- 34,311
- 8
- 67
- 88
-
hi St3fan, I have about 70 png frames of 512x1024 to animate. I'm doing the NSData approach and i'm getting good results. But it would be great if I could lower the memory footprint and improve the frame rate. I'm using a CADisplayLink and getting about 15-16 frames per second. What do you recommend? should I try and use the PVRTVC approach? Or you animation framework? – nico Aug 18 '11 at 15:01