<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImage/PixelBuffer/makeArray(of:channelCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate6vImageO11PixelBufferVAaC07DynamicC6FormatVRszrlE9makeArray2of12channelCountSayqd__Gqd__m_SitlF"
  },
  "title" : "makeArray(of:channelCount:)"
}
-->

# makeArray(of:channelCount:)

Returns an array of `width * height * channelCount` values that’s a copy of the buffer’s visible contents.

```
func makeArray<U>(of scalarType: U.Type, channelCount: Int) -> [U]
```

## Parameters

`scalarType`

The scalar type of each array element.

`channelCount`

The number of channels in the pixel buffer.

## Return Value

An array of `scalarType` values that  contains the source buffer’s contents.

---

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)