<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIRenderDestination/init(bitmapData:width:height:bytesPerRow:format:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIRenderDestination(im)initWithBitmapData:width:height:bytesPerRow:format:"
  },
  "title" : "init(bitmapData:width:height:bytesPerRow:format:)"
}
-->

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

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

```
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, [`RGBA8`](/documentation/CoreImage/CIFormat/RGBA8)).

## Return Value

A [`CIRenderDestination`](/documentation/CoreImage/CIRenderDestination) object for rendering to a client-managed buffer.

## Discussion

The destination’s [`colorSpace`](/documentation/CoreImage/CIImage/colorSpace) property will default to a <doc://com.apple.documentation/documentation/CoreGraphics/CGColorSpace> created with <doc://com.apple.documentation/documentation/CoreGraphics/CGColorSpace/sRGB>, <doc://com.apple.documentation/documentation/CoreGraphics/CGColorSpace/extendedSRGB>, or <doc://com.apple.documentation/documentation/CoreGraphics/CGColorSpace/genericGrayGamma2_2>.

---

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)