---
title: "init(bitmapData:width:height:bytesPerRow:format:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/cirenderdestination/init(bitmapdata:width:height:bytesperrow:format:)"
---

# init(bitmapData:width:height:bytesPerRow:format:)

Creates a render destination based on a client-managed buffer.

## Declaration

```swift
init(bitmapData data: UnsafeMutableRawPointer, width: Int, height: Int, bytesPerRow: Int, format: CIFormat)
```

## Parameters

- `data`: Pointer to raw bits of a client-managed buffer that is at least (bytesPerRow * height) bytes in size.
- `width`: Width of the bitmap image in pixels.
- `height`: Height of the bitmap image in pixels.
- `bytesPerRow`: Number of bytes per row of data.
- `format`: Color format specifying how the colors are laid out in memory (for example, doc://com.apple.coreimage/documentation/CoreImage/CIFormat/RGBA8).

## Return Value

Return Value A CIRenderDestination object for rendering to a client-managed buffer.

## Discussion

Discussion The destination’s colorSpace property will default to a CGColorSpace created with sRGB, extendedSRGB, or genericGrayGamma2_2.

## See Also

### Creating a Render Destination

- [init(pixelBuffer:)](coreimage/cirenderdestination/init(pixelbuffer:).md)
- [init(ioSurface:)](coreimage/cirenderdestination/init(iosurface:)-1hfcq.md)
- [init(mtlTexture:commandBuffer:)](coreimage/cirenderdestination/init(mtltexture:commandbuffer:)-2iu5i.md)
- [init(width:height:pixelFormat:commandBuffer:mtlTextureProvider:)](coreimage/cirenderdestination/init(width:height:pixelformat:commandbuffer:mtltextureprovider:).md)
- [init(glTexture:target:width:height:)](coreimage/cirenderdestination/init(gltexture:target:width:height:)-9ci8e.md)
