Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the fastest way to load compressed images on iOS?

I am writing an iOS app which need to load a lot of full-screen size images into OpenGL. Image storage space is a concern, so I am using png or jpg. Problem is: Loading the image data takes way too long (100s of ms on an iPad2).

I was wondering if someone knows the fastest way to load good-quality compressed image data on an iPad or similar? This could include switching to different image compression formats (?)

Here's what I've found:

  • Loading jpg via the iOS implementation of libturbo-jpeg is faster than any way I found for png.

  • If you split jpg images in two, you can parallel-decompress via GCD which almost cuts the load time in half. Still not enough!

  • The PowerVR compressed PVRTC format can be loaded very quickly, but both compression ratio and image quality are way outside what I need...

  • No idea how jpeg-2000 would perform, but it seems to be optimized for compression ratio rather than decoding speed.

Any ideas?? This must be a common problem for games or similar..

Are there any newer image formats (jpg is 1986!!) which have portable implementation, maybe slightly less compression than jpg, but decode much faster?

like image 346
Paul Avatar asked Sep 14 '12 06:09

Paul


People also ask

How do I uncompress a photo on my iPhone?

How to Uncompress a Zipped File on iPhone and iPad. Launch the Files app on your iPhone or iPad. Find the zip file that you want to uncompress. Press and hold on the zip file, then select Uncompress from the contextual menu.

How do you reduce the MB size of a photo on iPad?

To get started, open the Shortcuts app on your iPhone or iPad. In the “My Shortcuts” tab, tap the Plus (“+”) button in the top-right corner to create a new shortcut. Tap the “Add Action” button. Search for and then add the “Resize Image” action.

Why are iPhone photos compressed?

When applied to all your pictures, Compress Photos can help you store up to 10 times more photos on your iPhone or iPad. Compress Photos is easy to use but it is incredibly powerful. The intelligent compression engine allows you to reduce the file size of photos without reducing their quality.


1 Answers

This library might help you out:

https://github.com/path/FastImageCache

like image 148
jervine10 Avatar answered Sep 17 '22 12:09

jervine10