---
title: "createSnapshotImage(ofType:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/qcrenderer/createsnapshotimage(oftype:)"
---

# createSnapshotImage(ofType:)

Returns the current image in the OpenGL context associated with the renderer, as an image object of the provided image type.

## Declaration

```swift
func createSnapshotImage(ofType type: String!) -> Any!
```

## Parameters

- `type`: A string that specifies any of the following image types: doc://com.apple.documentation/documentation/AppKit/NSBitmapImageRep, doc://com.apple.documentation/documentation/AppKit/NSImage, doc://com.apple.documentation/documentation/CoreImage/CIImage, CGImage, CVOpenGLBuffer, CVPixelBuffer.

## Return Value

Return Value The snapshot image in the provided image type. You are responsible for releasing this object when you no longer need it.

## See Also

### Taking Snapshot Images

- [snapshotImage()](quartz/qcrenderer/snapshotimage().md)
