BitmapFactory.DecodeFileDescriptor Method

Definition

Overloads

DecodeFileDescriptor(FileDescriptor)

Decode a bitmap from the file descriptor.

DecodeFileDescriptor(FileDescriptor, Rect, BitmapFactory+Options)

Decode a bitmap from the file descriptor.

DecodeFileDescriptor(FileDescriptor)

Decode a bitmap from the file descriptor.

[Android.Runtime.Register("decodeFileDescriptor", "(Ljava/io/FileDescriptor;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeFileDescriptor (Java.IO.FileDescriptor? fd);
[<Android.Runtime.Register("decodeFileDescriptor", "(Ljava/io/FileDescriptor;)Landroid/graphics/Bitmap;", "")>]
static member DecodeFileDescriptor : Java.IO.FileDescriptor -> Android.Graphics.Bitmap

Parameters

fd
FileDescriptor

The file descriptor containing the bitmap data to decode

Returns

the decoded bitmap, or null

Attributes

Remarks

Decode a bitmap from the file descriptor. If the bitmap cannot be decoded return null. The position within the descriptor will not be changed when this returns, so the descriptor can be used again as is.

Java documentation for android.graphics.BitmapFactory.decodeFileDescriptor(java.io.FileDescriptor).

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

DecodeFileDescriptor(FileDescriptor, Rect, BitmapFactory+Options)

Decode a bitmap from the file descriptor.

[Android.Runtime.Register("decodeFileDescriptor", "(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? DecodeFileDescriptor (Java.IO.FileDescriptor? fd, Android.Graphics.Rect? outPadding, Android.Graphics.BitmapFactory.Options? opts);
[<Android.Runtime.Register("decodeFileDescriptor", "(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;", "")>]
static member DecodeFileDescriptor : Java.IO.FileDescriptor * Android.Graphics.Rect * Android.Graphics.BitmapFactory.Options -> Android.Graphics.Bitmap

Parameters

fd
FileDescriptor

The file descriptor containing the bitmap data to decode

outPadding
Rect

If not null, return the padding rect for the bitmap if it exists, otherwise set padding to [-1,-1,-1,-1]. If no bitmap is returned (null) then padding is unchanged.

opts
BitmapFactory.Options

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

Returns

the decoded bitmap, or null

Attributes

Remarks

Java documentation for android.graphics.BitmapFactory.decodeFileDescriptor(java.io.FileDescriptor).

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