Share via


BitmapFactory.DecodeResource Method

Definition

Overloads

DecodeResource(Resources, Int32)

Synonym for #decodeResource(Resources, int, android.graphics.BitmapFactory.Options) with null Options.

DecodeResource(Resources, Int32, BitmapFactory+Options)

Synonym for #decodeResource(Resources, int, android.graphics.BitmapFactory.Options) with null Options.

DecodeResource(Resources, Int32)

Synonym for #decodeResource(Resources, int, android.graphics.BitmapFactory.Options) with null Options.

[Android.Runtime.Register("decodeResource", "(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeResource (Android.Content.Res.Resources? res, int id);
[<Android.Runtime.Register("decodeResource", "(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;", "")>]
static member DecodeResource : Android.Content.Res.Resources * int -> Android.Graphics.Bitmap

Parameters

res
Resources

The resources object containing the image data

id
Int32

The resource id of the image data

Returns

The decoded bitmap, or null if the image could not be decoded.

Attributes

Remarks

Synonym for #decodeResource(Resources, int, android.graphics.BitmapFactory.Options) with null Options.

Java documentation for android.graphics.BitmapFactory.decodeResource(android.content.res.Resources, int).

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

DecodeResource(Resources, Int32, BitmapFactory+Options)

Synonym for #decodeResource(Resources, int, android.graphics.BitmapFactory.Options) with null Options.

[Android.Runtime.Register("decodeResource", "(Landroid/content/res/Resources;ILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeResource (Android.Content.Res.Resources? res, int id, Android.Graphics.BitmapFactory.Options? opts);
[<Android.Runtime.Register("decodeResource", "(Landroid/content/res/Resources;ILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member DecodeResource : Android.Content.Res.Resources * int * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap

Parameters

res
Resources

The resources object containing the image data

id
Int32

The resource id of the image data

opts
BitmapFactory.Options

null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned.

Returns

The decoded bitmap, or null if the image could not be decoded.

Attributes

Remarks

Java documentation for android.graphics.BitmapFactory.decodeResource(android.content.res.Resources, int).

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