user174761
user174761

Reputation: 1829

What are the supported image file formats for display on the iPhone?

I have an image in .jpg format. Is that readable within an iPhone application? What are all of the image file extensions that can be loaded natively within an iPhone application?

Upvotes: 15

Views: 39819

Answers (2)

jamapag
jamapag

Reputation: 9318

https://developer.apple.com/library/content/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/LoadingImages/LoadingImages.html#//apple_ref/doc/uid/TP40010156-CH17-SW7

see Supported Image Formats

Doc says that:

Generally, the image formats that UIKit supports are the same formats supported by the Image I/O framework.

And in I/O Framework docs said that:

The Image I/O framework understands most of the common image file formats, such as JPEG, JPEG2000, RAW, TIFF, BMP, and PNG. Not all formats are supported on each platform. For the most up-to-date list of what Image I/O supports, you can call the these functions:

CGImageSourceCopyTypeIdentifiers returns an array of the Uniform Type Identifiers (UTIs) that Image I/O supports as image sources.

CGImageDestinationCopyTypeIdentifiers returns an array of the uniform type identifiers (UTIs) that Image I/O supports as image destinations.

Upvotes: 11

vodkhang
vodkhang

Reputation: 18741

I think many images file extension is readable in iPhone. Just name a few : jpg, jpeg, png

Here is the full list:

Format | Filename extensions

  • Tagged Image File Format (TIFF)

  • Joint Photographic Experts Group (JPEG)

  • Graphic Interchange Format (GIF)

  • Portable Network Graphic (PNG)

  • Windows Bitmap Format (DIB)

  • Windows Icon Format (.ico)

  • Windows Cursor (.cur)

  • XWindow bitmap (.xbm)

A list is from here

Upvotes: 20

Related Questions