Contents

byteCountPerPixel

Returns the number of bytes per pixel.

Declaration

var byteCountPerPixel: Int { get }

Discussion

For example, the following code prints the number of bytes per pixel in two interleaved buffers:

 let x = vImage.PixelBuffer<vImage.InterleavedFx2>(size: vImage.Size(width: 1,
                                                                     height: 1))
 let y = vImage.PixelBuffer<vImage.Interleaved8x4>(size: vImage.Size(width: 1,
                                                                     height: 1))

 // Prints "8 4".
 print(x.byteCountPerPixel, y.byteCountPerPixel)

See Also

Inspecting a pixel buffer