decode To Bitmap Or Null
Decode a file into a bitmap.
If cannot be decoded into a bitmap, the function returns null.
Receiver
Return
Bitmap or null.
Parameters
opts
the BitmapFactory.Options, default is null.
fun InputStream.decodeToBitmapOrNull(outPadding: Rect? = null, opts: BitmapFactory.Options? = null): Bitmap?
Decode a stream into a bitmap.
If cannot be decoded into a bitmap, the function returns null.
Receiver
Return
Bitmap or null.
Parameters
out Padding
set the padding of this bitmap, default is null.
opts
the BitmapFactory.Options, default is null.
Decode a byte array into a bitmap.
If cannot be decoded into a bitmap, the function returns null.
Receiver
Return
Bitmap or null.
Parameters
offset
the current offset, default is 0.
size
the current data length, default is ByteArray.size.