- 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.
Type Reason Java.IO.IOException if an error was encountered in the input or output stream. Java.Lang.IllegalStateException if not enough metadata information has been set to write a well-formatted DNG file.
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.