<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSGraphicsContext/ciContext",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSGraphicsContext(py)CIContext"
  },
  "title" : "ciContext"
}
-->

# ciContext

A context for Core Image objects that you can use to render into the graphics context.

```
var ciContext: CIContext? { get }
```

## Discussion

The <doc://com.apple.documentation/documentation/CoreImage/CIContext> object is created on demand and remains in existence for the lifetime of its owning [`NSGraphicsContext`](/documentation/AppKit/NSGraphicsContext) object. A <doc://com.apple.documentation/documentation/CoreImage/CIContext> object is an evaluation context for rendering a <doc://com.apple.documentation/documentation/CoreImage/CIImage> object through Quartz 2D or OpenGL. You use <doc://com.apple.documentation/documentation/CoreImage/CIContext>` `objects in conjunction with <doc://com.apple.documentation/documentation/CoreImage/CIFilter-swift.class>, <doc://com.apple.documentation/documentation/CoreImage/CIImage>, <doc://com.apple.documentation/documentation/CoreImage/CIVector>, and <doc://com.apple.documentation/documentation/CoreImage/CIColor> objects to take advantage of the built-in Core Image filters when processing images.

For more on <doc://com.apple.documentation/documentation/CoreImage/CIContext> objects and related Core Image objects, see [Core Image Programming Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/CoreImaging/ci_intro/ci_intro.html#//apple_ref/doc/uid/TP30001185).

---

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)