Android.Graphics.BitmapRegionDecoder.NewInstance Method
Create a BitmapRegionDecoder from an input stream.

Syntax

[Android.Runtime.Register("newInstance", "(Ljava/io/InputStream;Z)Landroid/graphics/BitmapRegionDecoder;", "")]
public static BitmapRegionDecoder NewInstance (System.IO.Stream p0, bool p1)

Parameters

is
The input stream that holds the raw data to be decoded into a BitmapRegionDecoder.
isShareable
If this is true, then the BitmapRegionDecoder may keep a shallow reference to the input. If this is false, then the BitmapRegionDecoder will explicitly make a copy of the input data, and keep that. Even if sharing is allowed, the implementation may still decide to make a deep copy of the input data. If an image is progressively encoded, allowing sharing may degrade the decoding speed.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.IOExceptionPrior to NoType:android/os/Build$VERSION_CODES;Href=../../../reference/android/os/Build.VERSION_CODES.html#KITKAT, if Java.IO.InputStream.MarkSupported returns true, is.mark(1024) would be called. As of NoType:android/os/Build$VERSION_CODES;Href=../../../reference/android/os/Build.VERSION_CODES.html#KITKAT, this is no longer the case.

Remarks

Create a BitmapRegionDecoder from an input stream. The stream's position will be where ever it was after the encoded data was read. Currently only the JPEG and PNG formats are supported.

[Android Documentation]

Requirements

Namespace: Android.Graphics
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 10