ImageProxy.PlaneProxy


public interface ImageProxy.PlaneProxy extends ImagePlane


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

Summary

Public methods

abstract @NonNull ByteBuffer

Returns the pixels buffer.

abstract int

Returns the pixel stride.

abstract int

Returns the row stride.

default @Nullable T
<T> unwrapAs(@NonNull Class<T> type)

Attempts to unwrap this object into the specified underlying type.

Public methods

getBuffer

Added in 1.0.0
abstract @NonNull ByteBuffer getBuffer()

Returns the pixels buffer.

See also
getBuffer

getPixelStride

Added in 1.0.0
abstract int getPixelStride()

Returns the pixel stride.

See also
getPixelStride

getRowStride

Added in 1.0.0
abstract int getRowStride()

Returns the row stride.

See also
getRowStride

unwrapAs

Added in 1.7.0-alpha03
default @Nullable T <T> unwrapAs(@NonNull Class<T> type)

Attempts to unwrap this object into the specified underlying type.

Callers should use this method to retrieve the wrapped platform object.

Implementation Notes

  • If the requested type is not supported by this wrapper, this method must return null.

  • Implementations designed for testing (e.g., fakes, mocks, or no-op wrappers) should return null to signal that no real underlying object is available.

Parameters
<T>

The expected type of the underlying object.

@NonNull Class<T> type

The Class representing the expected type of the underlying object.

Returns
@Nullable T

The underlying object cast to T, or null if the object cannot be unwrapped into the requested type.