Alpinista
Alpinista

Reputation: 3741

iPad Catalog app with 1000s of images

I am building an apparel catalog on the iPad. The app will contain over 2000 jpg product images at 2048 x 1536 @ 72ppi, plus 2 sizes of thumbnails for each image. The large size of the primary images is to allow for zooming in on the products at reasonable resolution. The larger thumbnails will be displayed on each page to show alternate colors for each product. The smaller thumbnails are used in a side-scrolling pop-up filmstrip-style page browser.

I am dynamically resizing the larger thumbnails from the full-sized images as each page is displayed (in a paging UIScrollView). The smaller thumbnails are pre-rendered in photoShop to maximize the performance of the side-scrolling page browser.

Aside from the space taken up on the device from so many images, what other issues or concerns are there around the large number of images in an app like this? Memory management is under control because I am paging the large images in and out as needed as the user moves between pages in the main UIScrollView.

Upvotes: 0

Views: 479

Answers (3)

Sam Dufel
Sam Dufel

Reputation: 17598

In my opinion, if you're dealing with that much data you should build a hybrid app, and host all the images on a web server somewhere. An image that size can approach 1 MB: 1MB * 2000 images = 2 gigabytes of storage space on the phone consumed.

Upvotes: 0

coneybeare
coneybeare

Reputation: 33101

If you are dealing with the large image memory management properly (by tiling) and your customers are aware of the sizes of the app and/or downloads then there really isn't much other concerns.

The iPad has enough processing power to handle this kind of image processing pretty swiftly, but I wouldn't expect this to run great on an older iPhone.

To prevent crashing, I would quadruple check that your memory management works the way you say it does, and that you definitely don't ship with NSZombieEnabled on.

Upvotes: 1

jer
jer

Reputation: 20236

You are going to want to take a look at the PhotoScroller sample code. Those are mighty large images, and will cause your app to crash with the amount of memory they consume.

To page between pages, that means you'll have 2 images always loaded. If you can tile the images, I strongly suggest you do, that will further reduce your memory footprint.

Keep in mind that just because you can use say, 80 MB of memory for your application, does not mean you SHOULD use that much. Be a nice neighbour, your application will run along side other applications which themselves, use memory. Try and reduce your footprint however possible.

Upvotes: 1

Related Questions