Contents

init(size:pixelFormat:)

Returns a new pixel buffer with a size that you specify.

Declaration

init(size: vImage.Size, pixelFormat: Format.Type = Format.self)

Parameters

  • size:

    The width and 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