FramePlane

interface FramePlane extends HybridObject

Represents a single Plane of a planar Frame.

See

Frame.getPlanes()

Properties

bytesPerRow

readonly bytesPerRow: number

Get the number of bytes per row of the underlying pixel buffer.

See


height

readonly height: number

Returns the height of this Plane.

Note

If this Plane (or its parent Frame) is invalid (isValid), this just returns 0.


isValid

readonly isValid: boolean

Gets whether this FramePlane (or its parent Frame) is still valid, or not.

If the Plane is invalid, you cannot access its data anymore. A Plane is automatically invalidated via dispose().


width

readonly width: number

Returns the width of this Plane.

Note

If this Plane (or its parent Frame) is invalid (isValid), this just returns 0.

Methods

getPixelBuffer()

getPixelBuffer(): ArrayBuffer

Gets the FramePlane's pixel data as an ArrayBuffer.

Discussion

This does not perform a copy, but since the Frame's data is stored on the GPU, it might lazily perform a GPU -> CPU download.

Discussion

Once the FramePlane gets invalidated (isValid == false), this ArrayBuffer is no longer safe to access.

Note

If this Plane (or its parent Frame) is invalid (isValid), this method throws.