iPhone Orientations

The Problem

When you take a picture with the camera in your iPhone, the hardware captures and saves your view as quickly as possible. One of the speed optimizations introduced with the iPhone 4 was to store the orientation of the phone in the EXIF data of the image and not do any rotation correction. The consequences of this decision are well documented elsewhere, but in short, pictures taken by an iPhone sometimes need to be rotated in your application before displaying them to clients that don't understand this EXIF rotation information.

While I was researching this, I was surprised that I didn't find a simple list of the possible orientations of the phone. I used an iPhone 5S to take a series of pictures, one in each orientation, and was able to produce the list I had hoped would exist.

-- Jason Owen

The Solution

The natural portrait orientation, with the home button on the bottom, is considered to be rotated 90° counter-clockwise.
Home button on the bottom, orientation 6, rotated 90° counter-clockwise

The normal orientation is to hold the phone horizontally with the home button on the right side.
Home button on the right, orientation 1, normal

Holding the phone upside-down is considered to be rotated 90° clockwise.
Home button on the top, orientation 8, rotated 90° clockwise

Images captured while holding the phone so the volume buttons are on the top and the home button is on the left are marked as being rotated 180°.
Home button on the left, orientation 3, rotated 180°

Credits

The iPhone stencil was designed by miketheindian and is used with his kind permission.