Language

YuvImage.CompressToJpegAsync(Rect, Int32, Stream) Method

Definition

Runs JPEG encoding of a YUV image region as a task.

public System.Threading.Tasks.Task<bool> CompressToJpegAsync(Android.Graphics.Rect? rectangle, int quality, System.IO.Stream? stream);
member this.CompressToJpegAsync : Android.Graphics.Rect * int * System.IO.Stream -> System.Threading.Tasks.Task<bool>

Parameters

rectangle
Rect

The image region to encode; its bounds are adjusted for YUV subsampling alignment.

quality
Int32

The JPEG quality setting, from zero to 100.

stream
Stream

The stream that receives the encoded JPEG bytes.

Returns

A task that yields true if the encoder reports success, or false otherwise.

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