<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImage/init(mtlTexture:options:)-67uvj",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImage(im)initWithMTLTexture:options:"
  },
  "title" : "init(mtlTexture:options:)"
}
-->

# init(mtlTexture:options:)

Initializes an image object with data supplied by a Metal texture.

```
init?(mtlTexture texture: any MTLTexture, options: [CIImageOption : Any]? = nil)
```

## Parameters

`texture`

The Metal texture from which to use image data.

`options`

A dictionary specifying image options. (See `Image Dictionary Keys`.)

## Return Value

The initialized image object, or `nil` if the image could not be initialized.

## Discussion

To render the image using Metal, use this image with a Metal-based [`CIContext`](/documentation/CoreImage/CIContext) object created with the [`init(mtlDevice:)`](/documentation/CoreImage/CIContext/init(mtlDevice:)-swey) method, and call the [`render(_:to:commandBuffer:bounds:colorSpace:)`](/documentation/CoreImage/CIContext/render(_:to:commandBuffer:bounds:colorSpace:)) method to create an output image in another Metal texture object.

---

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)