Android Guides | Samples

Android.Media.Image Class

See Also: Image


[Android.Runtime.Register("android/media/Image", DoNotGenerateAcw=true)]
public abstract class Image : Object


A single complete image buffer to use with a media source such as a MediaCodec or a CameraDevice.

This class allows for efficient direct application access to the pixel data of the Image through one or more ByteBuffer. Each buffer is encapsulated in a NoType:android/media/Image$Plane;Href=../../../reference/android/media/Image.Plane.html that describes the layout of the pixel data in that plane. Due to this direct access, and unlike the Bitmap class, Images are not directly usable as as UI resources.

Since Images are often directly produced or consumed by hardware components, they are a limited resource shared across the system, and should be closed as soon as they are no longer needed.

For example, when using the ImageReader class to read out Images from various media sources, not closing old Image objects will prevent the availability of new Images once ImageReader.MaxImages is reached. When this happens, the function acquiring new Images will typically throw an IllegalStateException.

See Also

[Android Documentation]


Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions:

The members of Android.Media.Image are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

CropRectRect. Get the crop rectangle associated with this frame.
FormatImageFormatType. Get the format for this image.
HeightInt32. The height of the image in pixels.
TimestampInt64. Get the timestamp associated with this frame.
WidthInt32. The width of the image in pixels.

Protected Properties

ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Free up this frame for reuse.
GetPlanes() : Image+Plane[]
Get the array of pixel planes for this Image.