Language

BitmapFactory.DecodeResourceStream Method

Definition

Decode a new Bitmap from an InputStream.

[Android.Runtime.Register("decodeResourceStream", "(Landroid/content/res/Resources;Landroid/util/TypedValue;Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeResourceStream(Android.Content.Res.Resources? res, Android.Util.TypedValue? value, System.IO.Stream? is, Android.Graphics.Rect? pad, Android.Graphics.BitmapFactory.Options? opts);
[<Android.Runtime.Register("decodeResourceStream", "(Landroid/content/res/Resources;Landroid/util/TypedValue;Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member DecodeResourceStream : Android.Content.Res.Resources * Android.Util.TypedValue * System.IO.Stream * Android.Graphics.Rect * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap

Parameters

res
Resources

The optional resource table supplying the target display density.

value
TypedValue

Optional resource metadata supplying the image's source density.

is
Stream

The stream containing encoded image bytes.

pad
Rect

An optional rectangle to receive image padding.

opts
BitmapFactory.Options

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

Returns

The decoded bitmap, or null when decoding produces no bitmap, including a bounds-only request.

Attributes

Remarks

Java documentation for android.graphics.BitmapFactory.decodeResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, android.graphics.Rect, android.graphics.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