<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBitmapImageRep/init(ciImage:)-7bi19",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSBitmapImageRep(im)initWithCIImage:"
  },
  "title" : "init(ciImage:)"
}
-->

# init(ciImage:)

Returns a bitmap image representation from a Core Image object.

```
init(ciImage: CIImage)
```

## Parameters

`ciImage`

A Core Image object whose contents are to be copied to the receiver. This image rectangle must be of a finite size.

## Return Value

An [`NSBitmapImageRep`](/documentation/AppKit/NSBitmapImageRep) object initialized from the contents of the Core Image (<doc://com.apple.documentation/documentation/CoreImage/CIImage>) object.

## Discussion

The image in the `ciImage` parameter must be fully rendered before the receiver can be initialized. If you specify an object whose rendering was deferred (and thus does not have any pixels available now), this method forces the image to be rendered immediately. Rendering the image could result in a performance penalty if the image has a complex rendering chain or accelerated rendering hardware is not available. Rendering uses the current graphics context in the thread from which this method is called; to ensure consistent results across multiple threads, set the current context using the [`NSGraphicsContext`](/documentation/AppKit/NSGraphicsContext) class before calling this method.

By the time this method returns, the resultant [`NSBitmapImageRep`](/documentation/AppKit/NSBitmapImageRep) object can have its raw pixel data inspected, can be put on the pasteboard, and can be encoded to any of the standard image formats that [`NSBitmapImageRep`](/documentation/AppKit/NSBitmapImageRep) supports (JPEG, TIFF, and so on.)

If you pass in a <doc://com.apple.documentation/documentation/CoreImage/CIImage> object whose extents are not finite, this method raises an exception.

## See Also

  <doc://com.apple.documentation/documentation/CoreImage/CIImage/init(bitmapImageRep:)>



---

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)