<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImage/init(cgImage:)-2kvvb",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImage(im)initWithCGImage:"
  },
  "title" : "init(cgImage:)"
}
-->

# init(cgImage:)

Initializes an image object with a Quartz 2D image.

```
init(cgImage image: CGImage)
```

## Parameters

`image`

A Quartz 2D image (<doc://com.apple.documentation/documentation/CoreGraphics/CGImage>) object. For more information, see [Quartz 2D Programming Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001066) and <doc://com.apple.documentation/documentation/CoreGraphics/CGImage>.

## Return Value

The initialized image object.

## See Also

[`imageWithCGImage:`](/documentation/CoreImage/CIImage/imageWithCGImage:)

Creates and returns an image object from a Quartz 2D image.



---

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)