---
title: "init(ioSurface:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/ciimage/init(iosurface:)-5e9yc"
---

# init(ioSurface:)

Initializes an image with the contents of an IOSurface.

## Declaration

```swift
init(ioSurface surface: IOSurfaceRef)
```

## Parameters

- `surface`: An IOSurface object.

## Return Value

Return Value An image object initialized with the data from the IOSurface object.

## Discussion

Discussion An IOSurface object is a framebuffer object that is suitable for sharing across process boundaries. You can use it to allow your app to move complex image decompression and drawing logic into a separate process for the purpose of increasing security.

## See Also

### Creating an Image

- [empty()](coreimage/ciimage/empty().md)
- [init(image:)](coreimage/ciimage/init(image:).md)
- [init(image:options:)](coreimage/ciimage/init(image:options:).md)
- [init(contentsOf:)](coreimage/ciimage/init(contentsof:).md)
- [init(contentsOf:options:)](coreimage/ciimage/init(contentsof:options:).md)
- [init(cgImage:)](coreimage/ciimage/init(cgimage:)-2kvvb.md)
- [init(cgImage:options:)](coreimage/ciimage/init(cgimage:options:)-8663h.md)
- [init(cgImageSource:index:options:)](coreimage/ciimage/init(cgimagesource:index:options:)-e2bz.md)
- [init(data:)](coreimage/ciimage/init(data:).md)
- [init(data:options:)](coreimage/ciimage/init(data:options:).md)
- [init(bitmapData:bytesPerRow:size:format:colorSpace:)](coreimage/ciimage/init(bitmapdata:bytesperrow:size:format:colorspace:).md)
- [init(bitmapImageRep:)](coreimage/ciimage/init(bitmapimagerep:).md)
- [init(imageProvider:size:_:format:colorSpace:options:)](coreimage/ciimage/init(imageprovider:size:_:format:colorspace:options:).md)
- [init(depthData:)](coreimage/ciimage/init(depthdata:).md)
- [init(depthData:options:)](coreimage/ciimage/init(depthdata:options:).md)
