This is a study to determine the optimal method to decode and display single-use JPEG images on iPhone and iPad.
This code depends on libjpeg-turbo, available from http://libjpeg-turbo.virtualgl.org
4 methods are used to decode the same 10 JPEG images:
- Creating a CGImage directly using a JPEGDataProvider and letting the CALayer decode it.
- Forcing the CGImage to be decoded by drawing it into another CGImage.
- Using TurboJpeg to decode and putting the results in a CGImage.
- Using TurboJpeg to decode to YUV images and using OpenGL ES to combine those images onto the CALayer.