Android.Media.Image Class

See Also: Image Members

Syntax

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

Remarks

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

This class allows for efficient direct application access to the pixel data of the Image through one or more Java.Nio.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 Android.Graphics.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 Android.Media.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 Java.Lang.IllegalStateException.

See Also

[Android Documentation]

Requirements

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