<!--
{
  "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/imageWithCGImage:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImage(cm)imageWithCGImage:"
  },
  "title" : "imageWithCGImage:"
}
-->

# imageWithCGImage:

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

```
+ (CIImage *) imageWithCGImage:(CGImageRef) image;
```

## 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

An image object initialized with the contents of the 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)