Contents

init(width:height:pixelFormat:)

Returns a new pixel buffer with a width and height that you specify.

Declaration

init(width: Int, height: Int, pixelFormat: Format.Type = Format.self)

Parameters

  • width:

    The width of the buffer.

  • height:

    The height of the buffer.

  • pixelFormat:

    The pixel format of the buffer.

Discussion

This initializer allocates but doesn’t initialize the pixel buffer’s memory. That is, the operation doesn’t guarantee that all pixel values are zero.

See Also

Creating a pixel buffer