Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static abstract class

Image.Plane

extends Object
java.lang.Object
   ↳ android.media.Image.Plane

Class Overview

A single color plane of image data.

The number and meaning of the planes in an Image are determined by the format of the Image.

Once the Image has been closed, any access to the the plane's ByteBuffer will fail.

See Also

Summary

Public Methods
abstract ByteBuffer getBuffer ()

Get a direct ByteBuffer containing the frame data.

abstract int getPixelStride ()

The distance between adjacent pixel samples, in bytes.

abstract int getRowStride ()

The row stride for this color plane, in bytes.

[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public abstract ByteBuffer getBuffer ()

Get a direct ByteBuffer containing the frame data.

In particular, the buffer returned will always have isDirect return true , so the underlying data could be mapped as a pointer in JNI without doing any copies with GetDirectBufferAddress .

Returns
  • the byte buffer containing the image data for this plane.

public abstract int getPixelStride ()

The distance between adjacent pixel samples, in bytes.

This is the distance between two consecutive pixel values in a row of pixels. It may be larger than the size of a single pixel to account for interleaved image data or padded formats. The pixel stride is always greater than 0.

public abstract int getRowStride ()

The row stride for this color plane, in bytes.

This is the distance between the start of two consecutive rows of pixels in the image. The row stride is always greater than 0.