<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: 10.4.0 - 10.11.0",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImage/imageWithCGLayer:options:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImage(cm)imageWithCGLayer:options:"
  },
  "title" : "imageWithCGLayer:options:"
}
-->

# imageWithCGLayer:options:

Creates and returns an image object  from the contents supplied by a `CGLayer` object, using the  specified options.

```
+ (CIImage *) imageWithCGLayer:(CGLayerRef) layer options:(NSDictionary<NSString *,id> *) options;
```

## Parameters

`layer`

A `CGLayer` 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/CGLayer>.

`options`

A dictionary specifying image options. (See `Image Dictionary Keys`.)

## Return Value

An image object initialized with the contents of the layer object  and set up with the specified options.

---

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)