init(bitmapData:width:height:bytesPerRow:format:)
Creates a render destination based on a client-managed buffer.
Declaration
init(bitmapData data: UnsafeMutableRawPointer, width: Int, height: Int, bytesPerRow: Int, format: CIFormat)Parameters
- data:
Pointer to raw bits of a client-managed buffer that is at least (
bytesPerRow*height) bytes in size. - width:
Width of the bitmap image in pixels.
- height:
Height of the bitmap image in pixels.
- bytesPerRow:
Number of bytes per row of data.
- format:
Color format specifying how the colors are laid out in memory (for example, Rgba8).
Return Value
A CIRenderDestination object for rendering to a client-managed buffer.
Discussion
The destination’s colorSpace property will default to a CGColorSpace created with sRGB, extendedSRGB, or genericGrayGamma2_2.