---
title: "init(bitsPerComponent:bitsPerPixel:colorSpace:bitmapInfo:version:decode:renderingIntent:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/vimage_cgimageformat/init(bitspercomponent:bitsperpixel:colorspace:bitmapinfo:version:decode:renderingintent:)"
---

# init(bitsPerComponent:bitsPerPixel:colorSpace:bitmapInfo:version:decode:renderingIntent:)

Creates a Core Graphics image format.

## Declaration

```swift
init(bitsPerComponent: UInt32, bitsPerPixel: UInt32, colorSpace: Unmanaged<CGColorSpace>!, bitmapInfo: CGBitmapInfo, version: UInt32, decode: UnsafePointer<CGFloat>!, renderingIntent: CGColorRenderingIntent)
```

## Parameters

- `bitsPerComponent`: The number of bits that represents one channel of data in one pixel.
- `bitsPerPixel`: The number of bits that represents one pixel.
- `colorSpace`: A description of the position of the pixel data in the image, relative to a reference XYZ color space.
- `bitmapInfo`: The component information that describes the color channels.
- `version`: Reserved for future expansion — pass 0 here.
- `decode`: The decode array for the image. See doc://com.apple.accelerate/documentation/Accelerate/vImage_CGImageFormat/decode for more information.
- `renderingIntent`: A rendering intent constant that specifies how Core Graphics handles colors that aren’t within the destination color space gamut.

## See Also

### Initializers

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