decode Bitmap Async
Decode bitmap from an imageUri. Accepts URI schemes accepted by ContentResolver.openInputStream:
content (ContentResolver.SCHEME_CONTENT)
android.resource (ContentResolver.SCHEME_ANDROID_RESOURCE)
file (ContentResolver.SCHEME_FILE)
The decode runs on a background dispatcher, so this is safe to call from the main thread.
Return
The decoded bitmap.
Parameters
context
The context to use.
image Uri
Uri from which to read the bitmap.
Throws
When the file could not be read.