Language

BitmapFactory.DecodeResourceAsync Method

Definition

Overloads

Name Description
DecodeResourceAsync(Resources, Int32)

Runs image-resource decoding as a task.

DecodeResourceAsync(Resources, Int32, BitmapFactory+Options)

Runs image-resource decoding with the supplied options as a task.

DecodeResourceAsync(Resources, Int32)

Runs image-resource decoding as a task.

public static System.Threading.Tasks.Task<Android.Graphics.Bitmap?> DecodeResourceAsync(Android.Content.Res.Resources? res, int id);
static member DecodeResourceAsync : Android.Content.Res.Resources * int -> System.Threading.Tasks.Task<Android.Graphics.Bitmap>

Parameters

res
Resources

The resource table containing the image.

id
Int32

The resource identifier of the encoded image.

Returns

A task that yields the decoded bitmap, or null if the resource cannot be opened or decoded.

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

DecodeResourceAsync(Resources, Int32, BitmapFactory+Options)

Runs image-resource decoding with the supplied options as a task.

public static System.Threading.Tasks.Task<Android.Graphics.Bitmap?> DecodeResourceAsync(Android.Content.Res.Resources? res, int id, Android.Graphics.BitmapFactory.Options? opts);
static member DecodeResourceAsync : Android.Content.Res.Resources * int * Android.Graphics.BitmapFactory.Options -> System.Threading.Tasks.Task<Android.Graphics.Bitmap>

Parameters

res
Resources

The resource table containing the image.

id
Int32

The resource identifier of the encoded image.

opts
BitmapFactory.Options

Decode settings and result fields, or null for default settings.

Returns

A task that yields the decoded bitmap, or null when decoding produces no bitmap, including a bounds-only request.

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