Large Image Downsizing

Last Revision:
Version 1.1, 2014-03-27
Updated for iOS 7 SDK.
(Full Revision History)
Build Requirements:
iOS SDK 7 or later
Runtime Requirements:
iOS 6 or later

This code sample demonstrates a way to support displaying very large images in limited memory environments by turning a large image on disk into a smaller image in memory. This is useful in situations where the original image is too large to fit into memory as required for it to be displayed.

Having useful implications in supporting user defined documents, it should be noted that the photo roll or document sharing drop are the locations that a large image would exist. For simplicity this sample reads a large image from the bundle.

Supported formats are: PNG, TIFF, JPEG. Unsupported formats: GIF, BMP, interlaced images.