MutableImageWrapper


interface MutableImageWrapper : ImageWrapper

Known direct subclasses
FakeImage

Fake implementation of MutableImageWrapper for testing.


A mutable extension of ImageWrapper that allows modifying properties of the image.

This interface is useful when modifying the metadata of an image, such as its crop rectangle, timestamp, or synchronization fence.

Summary

Public properties

Rect

The crop rectangle of the image.

Int

The dataspace associated with this image.

SyncFence?

The sync fence associated with this image, or null if there is no fence.

Long

The timestamp associated with this image, in nanoseconds.

Inherited functions

From androidx.camera.common.ImageWrapper
Unit

Closes the underlying image and releases any associated resources.

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

Attempts to unwrap this object into the specified underlying type.

Inherited properties

From androidx.camera.common.ImageWrapper
Int

The format of the image.

open HardwareBuffer?

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

Int

The height of the image in pixels.

List<ImagePlane>

The list of pixel planes for this image.

Int

The width of the image in pixels.

Public properties

cropRect

var cropRectRect

The crop rectangle of the image.

See also
setCropRect

dataSpace

var dataSpaceInt

The dataspace associated with this image.

The value set must be one of the constants defined in ImageDataSpace.

syncFence

var syncFenceSyncFence?

The sync fence associated with this image, or null if there is no fence.

See also
setFence

timestamp

var timestampLong

The timestamp associated with this image, in nanoseconds.

See also
setTimestamp