<!--
{
  "availability" : [
    "Swift: -",
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INImage/init(CGImage:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INImage(cm)imageWithCGImage:"
  },
  "title" : "init(CGImage:)"
}
-->

# init(CGImage:)

Creates an image object from the specified Core Graphics image.

```
convenience init(CGImage imageRef: CGImage)
```

## Parameters

`imageRef`

A Core Graphics image that contains the image data to use.

## Return Value

An image object that contains the specified Core Graphics image, or `nil` if that image is invalid.

## Discussion

---

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)