When to use PNG or JPG in iPhone development?

PNG’s are pixel perfect (non-lossy), and require very little extra CPU energy to display. However, large PNGs may take longer to read from storage than more compressed image formats, and thus be slower to display.

JPG’s are smaller to store, but lossy (amount depends on compression level), and to display them requires a much more complicated decoding algorithm. But the typical compression and image quality is usually quite sufficient for photos.

Use JPG’s for photos and for anything large, and PNG’s for anything small and/or designed to be displayed “pixel perfect” (e.g. small icons) or as a part of a composited transparent overlay, etc.

Leave a Comment