---
title: "init(ioSurface:plane:format:options:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/ciimage/init(iosurface:plane:format:options:)-93isn"
---

# init(ioSurface:plane:format:options:)

Initializes, using the specified format and options, an image with the contents of a specific data plane in an IOSurface.

## Declaration

```swift
init(ioSurface surface: IOSurfaceRef, plane: Int, format: CIFormat, options: [CIImageOption : Any]? = nil)
```

## Parameters

- `surface`: An IOSurface object.
- `plane`: The index of the data plane in the IOSurface object containing bitmap data for initializing the image.
- `format`: A pixel format constant. See Pixel Formats.
- `options`: A dictionary specifying image options. (See Image Dictionary Keys.)

## Return Value

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

## See Also

### Deprecated

- [init(cgLayer:)](coreimage/ciimage/init(cglayer:)-2lgo6.md)
- [init(cgLayer:options:)](coreimage/ciimage/init(cglayer:options:)-3p3l3.md)
- [init(texture:size:flipped:colorSpace:)](coreimage/ciimage/init(texture:size:flipped:colorspace:).md)
- [init(texture:size:flipped:options:)](coreimage/ciimage/init(texture:size:flipped:options:).md)
- [textureTarget](coreimage/ciimageoption/texturetarget.md)
- [textureFormat](coreimage/ciimageoption/textureformat.md)
