# ImagePlane

Artifact: [androidx.camera:camera-common](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/common/ImageWrapper.kt+class:androidx.camera.common.ImagePlane) Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

*** ** * ** ***


```
interface ImagePlane : UnsafeWrapper
```

<br />

Known direct subclasses [FakeImagePlane](https://developer.android.com/reference/kotlin/androidx/camera/common/testing/FakeImagePlane), [ImageProxy.PlaneProxy](https://developer.android.com/reference/kotlin/androidx/camera/core/ImageProxy.PlaneProxy)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/common/testing/FakeImagePlane` | Fake implementation of `https://developer.android.com/reference/kotlin/androidx/camera/common/ImagePlane` for testing classes that consume camera image planes. |
| `https://developer.android.com/reference/kotlin/androidx/camera/core/ImageProxy.PlaneProxy` | A plane proxy which has an analogous interface as `https://developer.android.com/reference/android/media/Image.Plane.html`. |

*** ** * ** ***

A wrapper interface that mirrors `https://developer.android.com/reference/android/media/Image.Plane.html`.

Represents a single color plane of image data.

## Summary

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/java/nio/ByteBuffer.html` | `https://developer.android.com/reference/kotlin/androidx/camera/common/ImagePlane#buffer()` A `https://developer.android.com/reference/java/nio/ByteBuffer.html` containing the image data for this plane. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/common/ImagePlane#pixelStride()` The pixel stride, in bytes. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/common/ImagePlane#rowStride()` The row stride, in bytes. |

### Inherited functions

From [androidx.camera.common.UnsafeWrapper](https://developer.android.com/reference/kotlin/androidx/camera/common/UnsafeWrapper) `T?` `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)(type: https://developer.android.com/reference/java/lang/Class.html<T>)`

Attempts to unwrap this object into the specified underlying `https://developer.android.com/reference/kotlin/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)`.

## Public properties

### buffer

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
val buffer: ByteBuffer
```

A `https://developer.android.com/reference/java/nio/ByteBuffer.html` 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 |
|---|---|
| `https://developer.android.com/reference/android/media/Image.Plane.html#getBuffer()` |   |

### pixelStride

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
val pixelStride: Int
```

The pixel stride, in bytes.

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

| See also |
|---|---|
| `https://developer.android.com/reference/android/media/Image.Plane.html#getPixelStride()` |   |

### rowStride

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
val rowStride: Int
```

The row stride, in bytes.

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

| See also |
|---|---|
| `https://developer.android.com/reference/android/media/Image.Plane.html#getRowStride()` |   |