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

Syntax

[Android.Runtime.Register("writeInputStream", "(Ljava/io/OutputStream;Landroid/util/Size;Ljava/io/InputStream;J)V", "")]
public void WriteInputStream (System.IO.Stream dngOutput, Android.Util.Size size, System.IO.Stream 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.IO.InputStream 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.
Java.Lang.IllegalArgumentExceptionif the size passed in does not match the

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.

[Android Documentation]

Requirements

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