<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIImage/init(cgImage:scale:orientation:)-2ouhh",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIImage(im)initWithCGImage:scale:orientation:"
  },
  "title" : "init(cgImage:scale:orientation:)"
}
-->

# init(cgImage:scale:orientation:)

Initializes and returns an image object with the specified scale and orientation factors.

```
init(cgImage: CGImage, scale: CGFloat, orientation: UIImage.Orientation)
```

## Parameters

`cgImage`

The Quartz image object.

`scale`

The scale factor to assume when interpreting the image data. Applying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the [`size`](/documentation/UIKit/UIImage/size) property.

`orientation`

The orientation of the image data. You can use this parameter to specify any rotation factors applied to the image.

## Return Value

An initialized `UIImage` object. In Objective-C, this method returns `nil` if the `ciImage` parameter is `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)