Freigeben über


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

Definition

Write a compressed version of the bitmap to the specified outputstream.

[Android.Runtime.Register("compress", "(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z", "")]
public bool Compress (Android.Graphics.Bitmap.CompressFormat format, int quality, System.IO.Stream stream);
[<Android.Runtime.Register("compress", "(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z", "")>]
member this.Compress : Android.Graphics.Bitmap.CompressFormat * int * System.IO.Stream -> bool

Parameters

format
Bitmap.CompressFormat

The format of the compressed image

quality
Int32

Hint to the compressor, 0-100. The value is interpreted differently depending on the CompressFormat.

stream
Stream

The outputstream to write the compressed data.

Returns

true if successfully compressed to the specified stream.

Attributes

Remarks

Java documentation for android.graphics.Bitmap.compress(android.graphics.CompressFormat, int, 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