Android Guides | Samples

Android.Graphics.Bitmap.CreateBitmap Method

Returns a mutable bitmap with the specified width and height.

Syntax

[Android.Runtime.Register("createBitmap", "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;", "")]
public static Bitmap CreateBitmap (Int32 width, Int32 height, Bitmap+Config config)

Parameters

width
The width of the bitmap
height
The height of the bitmap
config
The bitmap config to create.

Exceptions

TypeReason
IllegalArgumentExceptionif the width or height are <= 0

Remarks

Returns a mutable bitmap with the specified width and height. Its initial density is as per Bitmap.Density.

[Android Documentation]

Requirements

Namespace: Android.Graphics
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1