init(mtlTexture:options:)
Initializes an image object with data supplied by a Metal texture.
Declaration
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 object created with the init(mtlDevice:) method, and call the render(_:to:commandBuffer:bounds:colorSpace:) method to create an output image in another Metal texture object.
See Also
Creating an Image
empty()init(image:)init(image:options:)init(contentsOf:)init(contentsOf:options:)init(cgImage:)init(cgImage:options:)init(cgImageSource:index:options:)init(data:)init(data:options:)init(bitmapData:bytesPerRow:size:format:colorSpace:)init(bitmapImageRep:)init(imageProvider:size:_:format:colorSpace:options:)init(depthData:)init(depthData:options:)