Android Guides | Samples

Android.Graphics.Bitmap.Copy Method

Tries to make a new bitmap based on the dimensions of this bitmap, setting the new bitmap's config to the one specified, and then copying this bitmap's pixels into the new bitmap.

Syntax

[Android.Runtime.Register("copy", "(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;", "")]
public Bitmap Copy (Bitmap+Config config, Boolean isMutable)

Parameters

config
The desired config for the resulting bitmap
isMutable
True if the resulting bitmap should be mutable (i.e. its pixels can be modified)

Remarks

Tries to make a new bitmap based on the dimensions of this bitmap, setting the new bitmap's config to the one specified, and then copying this bitmap's pixels into the new bitmap. If the conversion is not supported, or the allocator fails, then this returns NULL. The returned bitmap initially has the same density as the original.

[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