<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImage/PixelBuffer/makeCGImage(cgImageFormat:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate6vImageO11PixelBufferVA2A06StaticC6FormatRzrlE11makeCGImage02cgbF0So0H3RefaSgSo01vb1_hF0V_tF"
  },
  "title" : "makeCGImage(cgImageFormat:)"
}
-->

# makeCGImage(cgImageFormat:)

Returns a Core Graphics image from the pixel buffer’s contents.

```
func makeCGImage(cgImageFormat: vImage_CGImageFormat) -> CGImage?
```

## Parameters

`cgImageFormat`

The Core Graphics format of the source buffer.

## Return Value

A Core Graphics image that contains the source buffer’s contents.

---

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)