Share via


Picture.WriteToStream(Stream) Method

Definition

Caution

deprecated

Write the picture contents to a stream.

[Android.Runtime.Register("writeToStream", "(Ljava/io/OutputStream;)V", "GetWriteToStream_Ljava_io_OutputStream_Handler")]
[System.Obsolete("deprecated")]
public virtual void WriteToStream (System.IO.Stream? stream);
[<Android.Runtime.Register("writeToStream", "(Ljava/io/OutputStream;)V", "GetWriteToStream_Ljava_io_OutputStream_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member WriteToStream : System.IO.Stream -> unit
override this.WriteToStream : System.IO.Stream -> unit

Parameters

stream
Stream
Attributes

Remarks

Write the picture contents to a stream. The data can be used to recreate the picture in this or another process by calling createFromStream(...) The resulting stream is NOT to be persisted across device restarts as there is no guarantee that the Picture can be successfully reconstructed.

This member is deprecated. The recommended alternative is to draw the picture into a Bitmap from which you can persist it as raw or compressed pixels.

Java documentation for android.graphics.Picture.writeToStream(java.io.OutputStream).

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

See also