Contents

init(pixelValues:size:pixelFormat:)

Creates a new pixel buffer by copying the supplied collection of pixel values.

Declaration

init<U>(pixelValues: U, size: vImage.Size, pixelFormat: Format.Type = Format.self) where U : AccelerateBuffer, Format.ComponentType == U.Element

Parameters

  • pixelValues:

    The source pixel values. pixelValues must contain size.width * size.height * channelCount elements.

  • size:

    The size of the new buffer.

  • pixelFormat:

    The pixel format of the initialized buffer.

See Also

Creating a pixel buffer from raw pixel data