---
title: UIImage.Orientation
framework: uikit
role: symbol
role_heading: Enumeration
path: uikit/uiimage/orientation
---

# UIImage.Orientation

Constants that specify the intended display orientation for an image.

## Declaration

```swift
enum Orientation
```

## Overview

Overview 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. The 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 imageOrientation 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 imageOrientation value of UIImage.Orientation.right indicates that this rotation has been applied.

note: Some frameworks describe image orientation using the CGImagePropertyOrientation type (or the raw TIFF/Exif numeric values that type defines symbols for). However, the underlying numeric values of that type are incompatible with UIImage.Orientation. For conversion help, see the CGImagePropertyOrientation overview.

## Topics

### Image orientations

- [UIImage.Orientation.up](uikit/uiimage/orientation/up.md)
- [UIImage.Orientation.down](uikit/uiimage/orientation/down.md)
- [UIImage.Orientation.left](uikit/uiimage/orientation/left.md)
- [UIImage.Orientation.right](uikit/uiimage/orientation/right.md)
- [UIImage.Orientation.upMirrored](uikit/uiimage/orientation/upmirrored.md)
- [UIImage.Orientation.downMirrored](uikit/uiimage/orientation/downmirrored.md)
- [UIImage.Orientation.leftMirrored](uikit/uiimage/orientation/leftmirrored.md)
- [UIImage.Orientation.rightMirrored](uikit/uiimage/orientation/rightmirrored.md)

### Initializers

- [init(rawValue:)](uikit/uiimage/orientation/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Related Documentation

- [CGImagePropertyOrientation](imageio/cgimagepropertyorientation.md)

### Accessing image attributes

- [imageOrientation](uikit/uiimage/imageorientation.md)
- [flipsForRightToLeftLayoutDirection](uikit/uiimage/flipsforrighttoleftlayoutdirection.md)
- [resizingMode](uikit/uiimage/resizingmode-swift.property.md)
- [UIImage.ResizingMode](uikit/uiimage/resizingmode-swift.enum.md)
- [duration](uikit/uiimage/duration.md)
- [capInsets](uikit/uiimage/capinsets.md)
- [alignmentRectInsets](uikit/uiimage/alignmentrectinsets.md)
- [isSymbolImage](uikit/uiimage/issymbolimage.md)
