Android.Hardware.Camera2.DngCreator.WriteByteBuffer Method
Write the Android.Graphics.ImageFormat.RawSensor pixel data to a DNG file with the currently configured metadata.

Syntax

[Android.Runtime.Register("writeByteBuffer", "(Ljava/io/OutputStream;Landroid/util/Size;Ljava/nio/ByteBuffer;J)V", "")]
public void WriteByteBuffer (System.IO.Stream dngOutput, Android.Util.Size size, Java.Nio.ByteBuffer pixels, long offset)

Parameters

dngOutput
an Java.IO.OutputStream to write the DNG file to.
size
the Android.Util.Size of the image to write, in pixels.
pixels
an Java.Nio.ByteBuffer of pixel data to write.
offset
the offset of the raw image in bytes. This indicates how many bytes will be skipped in the input before any pixel data is read.

Exceptions

TypeReason
Java.IO.IOExceptionif an error was encountered in the input or output stream.
Java.Lang.IllegalStateExceptionif not enough metadata information has been set to write a well-formatted DNG file.

Remarks

Write the Android.Graphics.ImageFormat.RawSensor pixel data to a DNG file with the currently configured metadata.

Raw pixel data must have 16 bits per pixel, and the input must contain at least offset + 2 * width * height) bytes. The width and height of the input are taken from the width and height set in the Android.Hardware.Camera2.DngCreator metadata tags, and will typically be equal to the width and height of CameraCharacteristics.SensorInfoActiveArraySize. The pixel layout in the input is determined from the reported color filter arrangement (CFA) set in CameraCharacteristics.SensorInfoColorFilterArrangement. If insufficient metadata is available to write a well-formatted DNG file, an Java.Lang.IllegalStateException will be thrown.

Any mark or limit set on this Java.Nio.ByteBuffer is ignored, and will be cleared by this method.

[Android Documentation]

Requirements

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