get Remote Bitmap
private fun getRemoteBitmap(uri: Uri, destinationWidth: Int, destinationHeight: Int): BitmapAndHeaders
Downloads a remote image and returns a bitmap of the image. If provided the bounds of the destination view, the bitmap will be sampled to fit, avoiding OOM exceptions on large images.
Return
the bitmap of the image
Parameters
uri
the uri of the remote image.
destination Width
the width of the view that will display this bitmap. If 0, the bitmap will be unsampled.
destination Height
the height of the view that will display this bitmap. If 0, the bitmap will be unsampled.