A value describing the intended display orientation for an image.
- iOS 2.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Orientation values are commonly found in image metadata, and specifying image orientation correctly can be important both for displaying the image and for certain kinds of image processing.
UIImage class automatically handles the transform necessary to present an image in the correct display orientation according to its orientation metadata, so an image object's
image property simply indicates which transform was applied.
For example, an iOS device camera always encodes pixel data in the camera sensor's native landscape orientation, along with metadata indicating the camera orientation. When UIImage loads a photo shot in portrait orientation, it automatically applies a 90° rotation before displaying the image data, and the image's
image value of
UIImage indicates that this rotation has been applied.