BitmapFactory.DecodeResource Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
DecodeResource(Resources, Int32) |
Synonym for |
DecodeResource(Resources, Int32, BitmapFactory+Options) |
Synonym for |
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.
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
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
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.