decodeBitmap

fun decodeBitmap(context: Context, imageUri: Uri): Bitmap

Read bitmap from an imageUri. Accepts URI schemes accepted by ContentResolver.openInputStream:

Blocking — call it off the main thread, or use decodeBitmapAsync.

Return

decoded bitmap data.

Parameters

context

The context to use.

imageUri

Uri from which to read the bitmap.

Throws

When file could not be read.