Language

Bitmap.CompressAsync(Bitmap+CompressFormat, Int32, Stream) Method

Definition

Runs bitmap encoding to a stream as a task.

public System.Threading.Tasks.Task<bool> CompressAsync(Android.Graphics.Bitmap.CompressFormat format, int quality, System.IO.Stream stream);
member this.CompressAsync : Android.Graphics.Bitmap.CompressFormat * int * System.IO.Stream -> System.Threading.Tasks.Task<bool>

Parameters

format
Bitmap.CompressFormat

The encoded image format to write.

quality
Int32

The format-specific compression hint, from zero to 100.

stream
Stream

The stream that receives the encoded image bytes.

Returns

A task that yields true if encoding succeeds, or false if the encoder reports failure.

Remarks

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