public interface ImagePlane extends UnsafeWrapper

Known direct subclasses
FakeImagePlane

Fake implementation of ImagePlane for testing classes that consume camera image planes.

ImageProxy.PlaneProxy

A plane proxy which has an analogous interface as android.media.Image.Plane.


A wrapper interface that mirrors Image.Plane.

Represents a single color plane of image data.

Summary

Public methods

abstract @NonNull ByteBuffer

A ByteBuffer containing the image data for this plane.

abstract int

The pixel stride, in bytes.

abstract int

The row stride, in bytes.

Inherited methods

From androidx.camera.common.UnsafeWrapper
abstract T
<T extends Object> unwrapAs(@NonNull Class<@NonNull T> type)

Attempts to unwrap this object into the specified underlying type.

Public methods

getBuffer

Added in 1.7.0-alpha03
abstract @NonNull ByteBuffer getBuffer()

A ByteBuffer containing the image data for this plane.

The buffer's position will be set to the start of the plane data, and its limit will be set to the end of the plane data.

See also
getBuffer

getPixelStride

Added in 1.7.0-alpha03
abstract int getPixelStride()

The pixel stride, in bytes.

This is the distance between two consecutive pixel values in a row of the image buffer.

See also
getPixelStride

getRowStride

Added in 1.7.0-alpha03
abstract int getRowStride()

The row stride, in bytes.

This is the distance between the start of two consecutive rows of pixels in the image buffer.

See also
getRowStride