Sdílet prostřednictvím


BitmapFactory.DecodeFile Method

Definition

Overloads

DecodeFile(String)

Decode a file path into a bitmap.

DecodeFile(String, BitmapFactory+Options)

Decode a file path into a bitmap.

DecodeFile(String)

Decode a file path into a bitmap.

[Android.Runtime.Register("decodeFile", "(Ljava/lang/String;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeFile (string? pathName);
[<Android.Runtime.Register("decodeFile", "(Ljava/lang/String;)Landroid/graphics/Bitmap;", "")>]
static member DecodeFile : string -> Android.Graphics.Bitmap

Parameters

pathName
String

complete path name for the file to be decoded.

Returns

the resulting decoded bitmap, or null if it could not be decoded.

Attributes

Remarks

Decode a file path into a bitmap. If the specified file name is null, or cannot be decoded into a bitmap, the function returns null.

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

DecodeFile(String, BitmapFactory+Options)

Decode a file path into a bitmap.

[Android.Runtime.Register("decodeFile", "(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeFile (string? pathName, Android.Graphics.BitmapFactory.Options? opts);
[<Android.Runtime.Register("decodeFile", "(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member DecodeFile : string * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap

Parameters

pathName
String

complete path name for the file to be decoded.

opts
BitmapFactory.Options

null-ok; Options that control downsampling and whether the image should be completely decoded, or just is size returned.

Returns

the resulting decoded bitmap, or null if it could not be decoded.

Attributes

Remarks

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