---
title: "init(cgImage:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/vimage_cgimageformat/init(cgimage:)"
---

# init(cgImage:)

Creates a Core Graphics image format of the specified image.

## Declaration

```swift
init?(cgImage: CGImage)
```

## Parameters

- `cgImage`: The source Core Graphics image.

## Mentioned in

Converting bitmap data between Core Graphics images and vImage buffers

## See Also

### Initializers

- [init(bitsPerComponent:bitsPerPixel:colorSpace:bitmapInfo:version:decode:renderingIntent:)](accelerate/vimage_cgimageformat/init(bitspercomponent:bitsperpixel:colorspace:bitmapinfo:version:decode:renderingintent:).md)
- [init(bitsPerComponent:bitsPerPixel:colorSpace:bitmapInfo:renderingIntent:)](accelerate/vimage_cgimageformat/init(bitspercomponent:bitsperpixel:colorspace:bitmapinfo:renderingintent:).md)
- [init()](accelerate/vimage_cgimageformat/init().md)
