---
title: "init(imageSource:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/imagepresentationcomponent/spatial3dimage/init(imagesource:)"
---

# init(imageSource:)

Initializes a spatial 3D image from the contents of an image source.

## Declaration

```swift
init(imageSource: CGImageSource) async throws
```

## Discussion

Discussion note: The newly created spatial 3D image is not yet in a generated state.

## See Also

### Creating a spatial scene from a 2D image or spatial photo

- [init(contentsOf:)](realitykit/imagepresentationcomponent/spatial3dimage/init(contentsof:).md)
