views:

238

answers:

4

I want to display a thumbnail image in a cell of table view controller,this thumbnail image is located at some remote place(URL of address is in XML file) so which format of image is cost effective?

thanks in advance.

+1  A: 

Create a sample thumbnail, convert it to PNG, GIF and JPEG, and see which is smaller.

Sometimes measuring is easier than guessing.

skaffman
+3  A: 

It's mostly the same as on the Web, really. For graphics, PNG is generally more efficient; for photos, you'll want to pick JPEG.

I'm not sure whether the iPhone supports JPEG 2000 (OS X does), so that may be a more efficient options for photos.

Also consider tools such as optipng and jpegtran to shed some additional kilobytes off your image data.

Sören Kuklau
+1  A: 

@Soren, Pretty sure JPEG 2000 is not supported on the iPhone, in fact PDFs with jpeg2000 compressed images cause the viewing app to crash.

schwa
A: 

The recommendation for images in a UITableView is PNG, this has the best rendering performance.

catlan
This probably the best answer of the bunch. PNGs are highly recommended by Apple for performance and picking the right image format could have dramatic performance on table responsiveness.
schwa