Android.Graphics.ImageFormat.Raw10 Field
bit 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0
Byte 0:P0[9]P0[8]P0[7]P0[6]P0[5]P0[4]P0[3]P0[2]
Byte 1:P1[9]P1[8]P1[7]P1[6]P1[5]P1[4]P1[3]P1[2]
Byte 2:P2[9]P2[8]P2[7]P2[6]P2[5]P2[4]P2[3]P2[2]
Byte 3:P3[9]P3[8]P3[7]P3[6]P3[5]P3[4]P3[3]P3[2]
Byte 4:P3[1]P3[0]P2[1]P2[0]P1[1]P1[0]P0[1]P0[0]
where the row stride is in bytes, not pixels.

Value: 37

Syntax

[Android.Runtime.Register("RAW10")]
[System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.")]
public const ImageFormatType Raw10

See Also

Android.Media.Image
Android.Media.ImageReader
Android.Hardware.Camera2.CameraDevice

Remarks

bit 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0
Byte 0:P0[9]P0[8]P0[7]P0[6]P0[5]P0[4]P0[3]P0[2]
Byte 1:P1[9]P1[8]P1[7]P1[6]P1[5]P1[4]P1[3]P1[2]
Byte 2:P2[9]P2[8]P2[7]P2[6]P2[5]P2[4]P2[3]P2[2]
Byte 3:P3[9]P3[8]P3[7]P3[6]P3[5]P3[4]P3[3]P3[2]
Byte 4:P3[1]P3[0]P2[1]P2[0]P1[1]P1[0]P0[1]P0[0]
where the row stride is in bytes, not pixels.

Android 10-bit raw format

This is a single-plane, 10-bit per pixel, densely packed (in each row), unprocessed format, usually representing raw Bayer-pattern images coming from an image sensor.

In an image buffer with this format, starting from the first pixel of each row, each 4 consecutive pixels are packed into 5 bytes (40 bits). Each one of the first 4 bytes contains the top 8 bits of each pixel, The fifth byte contains the 2 least significant bits of the 4 pixels, the exact layout data for each 4 consecutive pixels is illustrated below (Pi[j] stands for the jth bit of the ith pixel):

This format assumes

  • a width multiple of 4 pixels
  • an even height

Since this is a densely packed format, the pixel stride is always 0. The application must use the pixel data layout defined in above table to access each row data. When row stride is equal to width * (10 / 8), there will be no padding bytes at the end of each row, the entire image data is densely packed. When stride is larger than width * (10 / 8), padding bytes will be present at the end of each row.

For example, the Android.Media.Image object can provide data in this format from a Android.Hardware.Camera2.CameraDevice (if supported) through a Android.Media.ImageReader object. The Android.Media.Image.GetPlanes will return a single plane containing the pixel data. The pixel stride is always 0 in NoType:android/media/Image$Plane;Href=../../../reference/android/media/Image.Plane.html#getPixelStride(), and the NoType:android/media/Image$Plane;Href=../../../reference/android/media/Image.Plane.html#getRowStride() describes the vertical neighboring pixel distance (in bytes) between adjacent rows.

[Android Documentation]

Requirements

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