Compartir a través de


BitmapFactory.DecodeByteArray Method

Definition

Overloads

DecodeByteArray(Byte[], Int32, Int32)

Decode an immutable bitmap from the specified byte array.

DecodeByteArray(Byte[], Int32, Int32, BitmapFactory+Options)

Decode an immutable bitmap from the specified byte array.

DecodeByteArray(Byte[], Int32, Int32)

Decode an immutable bitmap from the specified byte array.

[Android.Runtime.Register("decodeByteArray", "([BII)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeByteArray (byte[]? data, int offset, int length);
[<Android.Runtime.Register("decodeByteArray", "([BII)Landroid/graphics/Bitmap;", "")>]
static member DecodeByteArray : byte[] * int * int -> Android.Graphics.Bitmap

Parameters

data
Byte[]

byte array of compressed image data

offset
Int32

offset into imageData for where the decoder should begin parsing.

length
Int32

the number of bytes, beginning at offset, to parse

Returns

The decoded bitmap, or null if the image could not be decoded.

Attributes

Remarks

Decode an immutable bitmap from the specified byte array.

Java documentation for android.graphics.BitmapFactory.decodeByteArray(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

DecodeByteArray(Byte[], Int32, Int32, BitmapFactory+Options)

Decode an immutable bitmap from the specified byte array.

[Android.Runtime.Register("decodeByteArray", "([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeByteArray (byte[]? data, int offset, int length, Android.Graphics.BitmapFactory.Options? opts);
[<Android.Runtime.Register("decodeByteArray", "([BIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member DecodeByteArray : byte[] * int * int * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap

Parameters

data
Byte[]

byte array of compressed image data

offset
Int32

offset into imageData for where the decoder should begin parsing.

length
Int32

the number of bytes, beginning at offset, to parse

opts
BitmapFactory.Options

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

Java documentation for android.graphics.BitmapFactory.decodeByteArray(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