Bitmap.CreateScaledBitmap(Bitmap, Int32, Int32, Boolean) Method

Definition

Creates a new bitmap, scaled from an existing bitmap, when possible.

[Android.Runtime.Register("createScaledBitmap", "(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? CreateScaledBitmap (Android.Graphics.Bitmap src, int dstWidth, int dstHeight, bool filter);
[<Android.Runtime.Register("createScaledBitmap", "(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;", "")>]
static member CreateScaledBitmap : Android.Graphics.Bitmap * int * int * bool -> Android.Graphics.Bitmap

Parameters

src
Bitmap

The source bitmap.

dstWidth
Int32

The new bitmap's desired width.

dstHeight
Int32

The new bitmap's desired height.

filter
Boolean

true if the source should be filtered.

Returns

Bitmap
Attributes

Exceptions

if width is <= 0, or height is <= 0

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