다음을 통해 공유


BitmapRegionDecoder.NewInstance Method

Definition

Overloads

NewInstance(ParcelFileDescriptor)

Create a BitmapRegionDecoder from the file descriptor.

NewInstance(Stream)

Create a BitmapRegionDecoder from an input stream.

NewInstance(String)

Create a BitmapRegionDecoder from a file path.

NewInstance(FileDescriptor, Boolean)

Create a BitmapRegionDecoder from the file descriptor.

NewInstance(Stream, Boolean)

Create a BitmapRegionDecoder from an input stream.

NewInstance(String, Boolean)

Create a BitmapRegionDecoder from a file path.

NewInstance(Byte[], Int32, Int32)

Create a BitmapRegionDecoder from the specified byte array.

NewInstance(Byte[], Int32, Int32, Boolean)

Create a BitmapRegionDecoder from the specified byte array.

NewInstance(ParcelFileDescriptor)

Create a BitmapRegionDecoder from the file descriptor.

[Android.Runtime.Register("newInstance", "(Landroid/os/ParcelFileDescriptor;)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)]
public static Android.Graphics.BitmapRegionDecoder NewInstance (Android.OS.ParcelFileDescriptor pfd);
[<Android.Runtime.Register("newInstance", "(Landroid/os/ParcelFileDescriptor;)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)>]
static member NewInstance : Android.OS.ParcelFileDescriptor -> Android.Graphics.BitmapRegionDecoder

Parameters

pfd
ParcelFileDescriptor

The parcel file descriptor containing the data to decode

Returns

Attributes

Remarks

Create a BitmapRegionDecoder from the file descriptor. The position within the descriptor will not be changed when this returns, so the descriptor can be used again as is. Currently only the JPEG, PNG, WebP and HEIF formats are supported.

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(android.os.ParcelFileDescriptor).

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

NewInstance(Stream)

Create a BitmapRegionDecoder from an input stream.

[Android.Runtime.Register("newInstance", "(Ljava/io/InputStream;)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)]
public static Android.Graphics.BitmapRegionDecoder? NewInstance (System.IO.Stream is);
[<Android.Runtime.Register("newInstance", "(Ljava/io/InputStream;)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)>]
static member NewInstance : System.IO.Stream -> Android.Graphics.BitmapRegionDecoder

Parameters

is
Stream

The input stream that holds the raw data to be decoded into a BitmapRegionDecoder.

Returns

A new BitmapRegionDecoder, or null if is is null.

Attributes

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, PNG, WebP and HEIF formats are supported.

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(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

NewInstance(String)

Create a BitmapRegionDecoder from a file path.

[Android.Runtime.Register("newInstance", "(Ljava/lang/String;)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)]
public static Android.Graphics.BitmapRegionDecoder NewInstance (string pathName);
[<Android.Runtime.Register("newInstance", "(Ljava/lang/String;)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)>]
static member NewInstance : string -> Android.Graphics.BitmapRegionDecoder

Parameters

pathName
String

complete path name for the file to be decoded.

Returns

Attributes

Remarks

Create a BitmapRegionDecoder from a file path. Currently only the JPEG, PNG, WebP and HEIF formats are supported.

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(java.lang.String).

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

NewInstance(FileDescriptor, Boolean)

Create a BitmapRegionDecoder from the file descriptor.

[Android.Runtime.Register("newInstance", "(Ljava/io/FileDescriptor;Z)Landroid/graphics/BitmapRegionDecoder;", "")]
public static Android.Graphics.BitmapRegionDecoder NewInstance (Java.IO.FileDescriptor fd, bool isShareable);
[<Android.Runtime.Register("newInstance", "(Ljava/io/FileDescriptor;Z)Landroid/graphics/BitmapRegionDecoder;", "")>]
static member NewInstance : Java.IO.FileDescriptor * bool -> Android.Graphics.BitmapRegionDecoder

Parameters

fd
FileDescriptor

The file descriptor containing the data to decode

isShareable
Boolean

This field has been ignored since Build.VERSION_CODES#KITKAT.

Returns

Attributes

Exceptions

if the image format is not supported or can not be decoded.

Remarks

Create a BitmapRegionDecoder from the file descriptor. The position within the descriptor will not be changed when this returns, so the descriptor can be used again as is. Currently only the JPEG, PNG, WebP and HEIF formats are supported.

This member is deprecated. In favor of #newInstance(ParcelFileDescriptor)

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(java.io.FileDescriptor, boolean).

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

NewInstance(Stream, Boolean)

Create a BitmapRegionDecoder from an input stream.

[Android.Runtime.Register("newInstance", "(Ljava/io/InputStream;Z)Landroid/graphics/BitmapRegionDecoder;", "")]
public static Android.Graphics.BitmapRegionDecoder? NewInstance (System.IO.Stream is, bool isShareable);
[<Android.Runtime.Register("newInstance", "(Ljava/io/InputStream;Z)Landroid/graphics/BitmapRegionDecoder;", "")>]
static member NewInstance : System.IO.Stream * bool -> Android.Graphics.BitmapRegionDecoder

Parameters

is
Stream

The input stream that holds the raw data to be decoded into a BitmapRegionDecoder.

isShareable
Boolean

This field has always been ignored.

Returns

A new BitmapRegionDecoder, or null if is is null.

Attributes

Exceptions

if the image format is not supported or can not be decoded.

Prior to F:Android.OS.Build+VERSION_CODES.KitKat, if MarkSupported() returns true, is.mark(1024) would be called. As of F:Android.OS.Build+VERSION_CODES.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, PNG, WebP and HEIF formats are supported.

This member is deprecated. In favor of #newInstance(InputStream)<p class="note">Prior to Build.VERSION_CODES#KITKAT, if InputStream#markSupported is.markSupported() returns true, is.mark(1024) would be called. As of Build.VERSION_CODES#KITKAT, this is no longer the case.</p>

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(java.io.InputStream, boolean).

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

NewInstance(String, Boolean)

Create a BitmapRegionDecoder from a file path.

[Android.Runtime.Register("newInstance", "(Ljava/lang/String;Z)Landroid/graphics/BitmapRegionDecoder;", "")]
public static Android.Graphics.BitmapRegionDecoder NewInstance (string pathName, bool isShareable);
[<Android.Runtime.Register("newInstance", "(Ljava/lang/String;Z)Landroid/graphics/BitmapRegionDecoder;", "")>]
static member NewInstance : string * bool -> Android.Graphics.BitmapRegionDecoder

Parameters

pathName
String

complete path name for the file to be decoded.

isShareable
Boolean

This field has always been ignored.

Returns

Attributes

Exceptions

if the image format is not supported or can not be decoded.

Remarks

Create a BitmapRegionDecoder from a file path. Currently only the JPEG, PNG, WebP and HEIF formats are supported.

This member is deprecated. In favor of #newInstance(String)

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(java.lang.String, boolean).

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

NewInstance(Byte[], Int32, Int32)

Create a BitmapRegionDecoder from the specified byte array.

[Android.Runtime.Register("newInstance", "([BII)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)]
public static Android.Graphics.BitmapRegionDecoder NewInstance (byte[] data, int offset, int length);
[<Android.Runtime.Register("newInstance", "([BII)Landroid/graphics/BitmapRegionDecoder;", "", ApiSince=31)>]
static member NewInstance : byte[] * int * int -> Android.Graphics.BitmapRegionDecoder

Parameters

data
Byte[]

byte array of compressed image data.

offset
Int32

offset into data for where the decoder should begin parsing.

length
Int32

the number of bytes, beginning at offset, to parse

Returns

Attributes

Remarks

Create a BitmapRegionDecoder from the specified byte array. Currently only the JPEG, PNG, WebP and HEIF formats are supported.

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(byte[], int, int).

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

NewInstance(Byte[], Int32, Int32, Boolean)

Create a BitmapRegionDecoder from the specified byte array.

[Android.Runtime.Register("newInstance", "([BIIZ)Landroid/graphics/BitmapRegionDecoder;", "")]
public static Android.Graphics.BitmapRegionDecoder NewInstance (byte[] data, int offset, int length, bool isShareable);
[<Android.Runtime.Register("newInstance", "([BIIZ)Landroid/graphics/BitmapRegionDecoder;", "")>]
static member NewInstance : byte[] * int * int * bool -> Android.Graphics.BitmapRegionDecoder

Parameters

data
Byte[]

byte array of compressed image data.

offset
Int32

offset into data for where the decoder should begin parsing.

length
Int32

the number of bytes, beginning at offset, to parse

isShareable
Boolean

This field has been ignored since Build.VERSION_CODES#GINGERBREAD.

Returns

Attributes

Exceptions

if the image format is not supported or can not be decoded.

Remarks

Create a BitmapRegionDecoder from the specified byte array. Currently only the JPEG, PNG, WebP and HEIF formats are supported.

This member is deprecated. In favor of #newInstance(byte[], int, int)

Java documentation for android.graphics.BitmapRegionDecoder.newInstance(byte[], int, int, boolean).

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