BitmapFactory.DecodeStream 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
DecodeStream(Stream) |
Decode an input stream into a bitmap. |
DecodeStream(Stream, Rect, BitmapFactory+Options) |
Decode an input stream into a bitmap. |
DecodeStream(Stream)
Decode an input stream into a bitmap.
[Android.Runtime.Register("decodeStream", "(Ljava/io/InputStream;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeStream (System.IO.Stream? is);
[<Android.Runtime.Register("decodeStream", "(Ljava/io/InputStream;)Landroid/graphics/Bitmap;", "")>]
static member DecodeStream : System.IO.Stream -> Android.Graphics.Bitmap
Parameters
- is
- Stream
The input stream that holds the raw data to be decoded into a bitmap.
Returns
The decoded bitmap, or null if the image data could not be decoded.
- Attributes
Remarks
Decode an input stream into a bitmap. If the input stream is null, or cannot be used to decode a bitmap, the function returns null. The stream's position will be where ever it was after the encoded data was read.
Java documentation for android.graphics.BitmapFactory.decodeStream(java.io.InputStream)
.
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
DecodeStream(Stream, Rect, BitmapFactory+Options)
Decode an input stream into a bitmap.
[Android.Runtime.Register("decodeStream", "(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeStream (System.IO.Stream? is, Android.Graphics.Rect? outPadding, Android.Graphics.BitmapFactory.Options? opts);
[<Android.Runtime.Register("decodeStream", "(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member DecodeStream : System.IO.Stream * Android.Graphics.Rect * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap
Parameters
- is
- Stream
The input stream that holds the raw data to be decoded into a bitmap.
- outPadding
- Rect
If not null, return the padding rect for the bitmap if it exists, otherwise set padding to [-1,-1,-1,-1]. If no bitmap is returned (null) then padding is unchanged.
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 data could not be decoded.
- Attributes
Remarks
Java documentation for android.graphics.BitmapFactory.decodeStream(java.io.InputStream)
.
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.