decodeToBitmapOrNull

fun File.decodeToBitmapOrNull(opts: BitmapFactory.Options? = null): <Error class: unknown class>

Decode a file into a bitmap.

If cannot be decoded into a bitmap, the function returns null.

Receiver

File

Return

Bitmap or null.

Parameters

opts

the BitmapFactory.Options, default is null.

See also


fun FileDescriptor.decodeToBitmapOrNull(outPadding: Rect? = null, opts: BitmapFactory.Options? = null): <Error class: unknown class>

Decode a file descriptor into a bitmap.

If cannot be decoded into a bitmap, the function returns null.

Receiver

FileDescriptor

Return

Bitmap or null.

Parameters

outPadding

set the padding of this bitmap, default is null, see BitmapFactory.decodeFileDescriptor.

opts

the BitmapFactory.Options, default is null.

See also


fun InputStream.decodeToBitmapOrNull(outPadding: Rect? = null, opts: BitmapFactory.Options? = null): <Error class: unknown class>

Decode a stream into a bitmap.

If cannot be decoded into a bitmap, the function returns null.

Receiver

InputStream

Return

Bitmap or null.

Parameters

outPadding

set the padding of this bitmap, default is null.

opts

the BitmapFactory.Options, default is null.

See also


fun ByteArray.decodeToBitmapOrNull(offset: Int = 0, size: Int = this.size): <Error class: unknown class>

Decode a byte array into a bitmap.

If cannot be decoded into a bitmap, the function returns null.

Receiver

ByteArray

Return

Bitmap or null.

Parameters

offset

the current offset, default is 0.

size

the current data length, default is ByteArray.size.

See also