ImageWrapper


interface ImageWrapper : UnsafeWrapper, AutoCloseable

Known direct subclasses
MutableImageWrapper

A mutable extension of ImageWrapper that includes write properties.

Known indirect subclasses
AndroidImage

ImageWrapper implementation that wraps an android.media.Image object.

FakeImage

Fake implementation of MutableImageWrapper for testing.


Wrapper interfaces that mirrors the primary read-only properties of android.media.Image.

Summary

Public properties

Rect
open Int
Int
open HardwareBuffer?

Returns a handle to the underlying image's hardware buffer, or null if this image does not support hardware buffer.

Int
List<ImagePlane>
open SyncFence?
Long
Int

Inherited functions

From java.lang.AutoCloseable
From androidx.camera.common.UnsafeWrapper
T?
<T : Any> unwrapAs(type: Class<T>)

Attempt to unwrap this object into an underlying type.

Public properties

cropRect

Added in 1.7.0-alpha02
val cropRectRect
See also
getCropRect

dataSpace

Added in 1.7.0-alpha02
open val dataSpaceInt
See also
getDataSpace

format

Added in 1.7.0-alpha02
val formatInt
See also
getFormat

hardwareBuffer

Added in 1.7.0-alpha02
open val hardwareBufferHardwareBuffer?

Returns a handle to the underlying image's hardware buffer, or null if this image does not support hardware buffer.

The android.hardware.HardwareBuffer follows the lifecycle of its associated image. It is not required to be closed explicitly; however, the image needs to be closed after finishing processing the hardware buffer. In other words, if the hardware buffer is being used, the image cannot be closed.

height

Added in 1.7.0-alpha02
val heightInt
See also
getHeight

imagePlanes

Added in 1.7.0-alpha02
val imagePlanesList<ImagePlane>
See also
getPlanes

syncFence

Added in 1.7.0-alpha02
open val syncFenceSyncFence?
See also
getFence

timestamp

Added in 1.7.0-alpha02
val timestampLong
See also
getTimestamp

width

Added in 1.7.0-alpha02
val widthInt
See also
getWidth