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

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

Creates a Core Graphics image format with a color space instance and default decode array.

## Declaration

```swift
init?(bitsPerComponent: Int, bitsPerPixel: Int, colorSpace: CGColorSpace, bitmapInfo: CGBitmapInfo, renderingIntent: CGColorRenderingIntent = .defaultIntent)
```

## 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.
- `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:version:decode:renderingIntent:)](accelerate/vimage_cgimageformat/init(bitspercomponent:bitsperpixel:colorspace:bitmapinfo:version:decode:renderingintent:).md)
- [init(cgImage:)](accelerate/vimage_cgimageformat/init(cgimage:).md)
- [init()](accelerate/vimage_cgimageformat/init().md)
