One Logo Pool Ball
Accelerate · IOS API REFERENCE

vImage.PixelBuffer

struct · iOS 16.0+ · SDK 27.1

struct PixelBuffer<Format> where Format : PixelFormat

A structure that stores an image's data, dimensions, bit depth, and number of channels. Use a `vImage.PixelBuffer` to represent an image from a `CGImage`, `CVPixelBuffer`, or collection of raw pixel values. Pixel buffers are typed by their bits per channel and number of channels. For example, `vImage.PixelBuffer<vImage.Interleaved8x4>` indicates a 4-channel, 8-bit per channel image, such as RGBA, ARGB, or CMYK. Pixel buffers expose methods that are available for the buffer's bit depth. For example, the fast box convolution functions are only available for one- and four-channel 8-bit per channel buffers: let src = vImage.PixelBuffer<vImage.Interleaved8x4>(cgImage: cgImage, cgImageFormat: &cgImageFormat) let dest = vImage.PixelBuffer<vImage.Interleaved8x4>(src.size) src.boxConvolve(kernelSize: vImage.Size(width: 64, height: 64), edgeMode: .truncateKernel, destination: dest) Typed pixel buffers provide a simple API to convert between pixel formats. For example, the following code converts 8-bit unsigned integer pixels to 32-bit floating point pixels: let src = vImage.PixelBuffer<vImage.Interleaved8x4>(cgImage: cgImage, cgImageFormat: &cgImageFormat) let dest = vImage.PixelBuffer<vImage.InterleavedFx4>(size: src.size) src.convert(to: dest)

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

58 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

vImage.PixelBuffer.multiply(by:divisor:preBias:postBias:destination:)

This declaration needs Swift generic type arguments. (no canonical witness for DestFormat)

vImage.PixelBuffer.multiply(by:preBias:postBias:destination:)

This declaration needs Swift generic type arguments. (no canonical witness for DestFormat)

vImage.PixelBuffer.multiply(by:preBias:postBias:destination:)

The iOS SDK compiler rejected this binding: cannot find type 'simd_float4x4' in scope

vImage.PixelBuffer.makeArray(of:channelCount:)

Passing a Swift type itself is not supported.

vImage.PixelBuffer.applyGamma(_:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.applyGamma(linearParameters:exponentialParameters:boundary:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.applyGamma(linearParameters:exponentialParameters:boundary:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.separableConvolve(horizontalKernel:verticalKernel:bias:edgeMode:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.separableConvolve(horizontalKernel:verticalKernel:bias:edgeMode:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.boxConvolve(kernelSize:edgeMode:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.tentConvolve(kernelSize:edgeMode:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.convolve(with:divisor:bias:edgeMode:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.convolve(with:bias:edgeMode:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.clip(to:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.colorThreshold(_:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.linearInterpolate(bufferB:interpolationConstant:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.rowCount

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.columnCount

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.accelerateMatrixOrder

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.leadingDimension

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.applyMorphology(operation:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.applyMorphology(operation:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.equalizeHistogram(destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.equalizeHistogram(binCount:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.contrastStretch(destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.contrastStretch(binCount:destination:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.withUnsafeVImageBuffer(_:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.withUnsafePointerToVImageBuffer(_:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.withUnsafeVImageBuffers(_:)

The containing type needs Swift generic type arguments. (no canonical witness for Format)

vImage.PixelBuffer.withUnsafePixelBuffers(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Format.PlanarPixelFormat)

All Accelerate types →