DngCreator.WriteInputStream(Stream, Size, Stream, Int64) Method

Definition

Write the android.graphics.ImageFormat#RAW_SENSOR pixel data to a DNG file with the currently configured metadata.

[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);
[<Android.Runtime.Register("writeInputStream", "(Ljava/io/OutputStream;Landroid/util/Size;Ljava/io/InputStream;J)V", "")>]
member this.WriteInputStream : System.IO.Stream * Android.Util.Size * System.IO.Stream * int64 -> unit

Parameters

dngOutput
Stream

an java.io.OutputStream to write the DNG file to.

size
Size

the Size of the image to write, in pixels.

pixels
Stream

an java.io.InputStream of pixel data to write.

offset
Int64

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.

Attributes

Exceptions

if an error was encountered in the input or output stream.

if not enough metadata information has been set to write a well-formatted DNG file.

if the size passed in does not match the

Remarks

Write the android.graphics.ImageFormat#RAW_SENSOR 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 DngCreator metadata tags, and will typically be equal to the width and height of CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. Prior to API level 23, this was always the same as CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE. The pixel layout in the input is determined from the reported color filter arrangement (CFA) set in CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT. If insufficient metadata is available to write a well-formatted DNG file, an java.lang.IllegalStateException will be thrown.

Java documentation for android.hardware.camera2.DngCreator.writeInputStream(java.io.OutputStream, android.util.Size, java.io.InputStream, long).

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.

Applies to