<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBitmapImageRep/imageReps(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSBitmapImageRep(cm)imageRepsWithData:"
  },
  "title" : "imageReps(with:)"
}
-->

# imageReps(with:)

Creates and returns an array of bitmap image representation objects that correspond to the images in the specified data.

```
class func imageReps(with data: Data) -> [NSImageRep]
```

## Parameters

`data`

A data object containing one or more bitmapped images or `nil` if the class is unable to create an image representation. The `bitmapData` parameter can contain data in any supported bitmap format.

## Return Value

An array of [`NSBitmapImageRep`](/documentation/AppKit/NSBitmapImageRep) instances or an empty array if the class is unable to create any image representations.

## Discussion

---

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)