<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhotogrammetrySample/init(id:image:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation20PhotogrammetrySampleV2id5imageACSi_So11CVBufferRefatcfc"
  },
  "title" : "init(id:image:)"
}
-->

# init(id:image:)

Creates a new sample.

```
init(id: Int, image: CVPixelBuffer)
```

## Parameters

`id`

A unique identifier for the sample.  This `id` *must* be in the domain [0, 2147483647].

`image`

The image data in one of the following formats:

- <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_32BGRA>
  - <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelFormatType_32ARGB>

---

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)