ImageFormat.Raw14 Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.
Android 14-bit raw format
[Android.Runtime.Register("RAW14", ApiSince=37)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.", true)]
public const Android.Graphics.ImageFormatType Raw14 = 44;
[<Android.Runtime.Register("RAW14", ApiSince=37)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.", true)>]
val mutable Raw14 : Android.Graphics.ImageFormatType
Field Value
Value = 44- Attributes
Remarks
Android 14-bit raw format
This is a single-plane, 14-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 four consecutive pixels are packed into 7 bytes (56 bits). The first four bytes contain the most significant 8 bits of the first 4 pixels. The last three bytes contain the 6 least significant bits of the four pixels, packed one after the other, the exact layout data for each four consecutive pixels is illustrated below (Pi[j] stands for the jth bit of the ith pixel):
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
Byte 0: P0[13] P0[12] P0[11] P0[10] P0[ 9] P0[ 8] P0[ 7] P0[ 6]
Byte 1: P1[13] P1[12] P1[11] P1[10] P1[ 9] P1[ 8] P1[ 7] P1[ 6]
Byte 2: P2[13] P2[12] P2[11] P2[10] P2[ 9] P2[ 8] P2[ 7] P2[ 6]
Byte 3: P3[13] P3[12] P3[11] P3[10] P3[ 9] P3[ 8] P3[ 7] P3[ 6]
Byte 4: P1[ 1] P1[ 0] P0[ 5] P0[ 4] P0[ 3] P0[ 2] P0[ 1] P0[ 0]
Byte 5: P2[ 3] P2[ 2] P2[ 1] P2[ 0] P1[ 5] P1[ 4] P1[ 3] P1[ 2]
Byte 6: P3[ 5] P3[ 4] P3[ 3] P3[ 2] P3[ 1] P3[ 0] P2[ 5] P2[ 4]
This format assumes a width multiple of 4 pixels and an even height.
size = row stride * height
where the row stride is in bytes, not pixels.
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 * (14 / 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 * (14 / 8), padding bytes will be present at the end of each row.
For example, the Image object can provide data in this format from a CameraDevice (if supported) through a ImageReader object. The Image#getPlanes() will return a single plane containing the pixel data. The pixel stride is always 0 in Image.Plane.getPixelStride(), and the Image.Plane.getRowStride() describes the vertical neighboring pixel distance (in bytes) between adjacent rows.
Android reference for android.graphics.ImageFormat.RAW14.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.