共用方式為


BitmapFactory.DecodeFile 方法

定義

多載

DecodeFile(String)

將檔案路徑譯碼為位圖。

DecodeFile(String, BitmapFactory+Options)

將檔案路徑譯碼為位圖。

DecodeFile(String)

將檔案路徑譯碼為位圖。

[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

參數

pathName
String

要譯碼之檔案的完整路徑名稱。

傳回

產生的譯碼位圖,如果無法譯碼,則為 null。

屬性

備註

將檔案路徑譯碼為位圖。 如果指定的檔名為 null,或無法譯碼為位圖,則函式會傳回 null。

android.graphics.BitmapFactory.decodeFile(java.lang.String)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

DecodeFile(String, BitmapFactory+Options)

將檔案路徑譯碼為位圖。

[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

參數

pathName
String

要譯碼之檔案的完整路徑名稱。

opts
BitmapFactory.Options

null-ok;控制縮小取樣的選項,以及影像是否應該完全譯碼,還是只傳回大小。

傳回

產生的譯碼位圖,如果無法譯碼,則為 null。

屬性

備註

android.graphics.BitmapFactory.decodeFile(java.lang.String)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於