decode Sampled Bitmap From Stream
private fun decodeSampledBitmapFromStream(inputStream: InputStream?, imageMetadata: BitmapFactory.Options, destinationWidth: Int, destinationHeight: Int): Bitmap?
Decodes an input stream into a bitmap. The image metadata and destination view bounds are used to sample the image to efficiently display the image.
Return
The sampled bitmap.
Parameters
input Stream
A stream to the remote image
image Metadata
Metadata about the source image.
destination Width
The width of the destination view in pixels.
destination Height
The height of the destination view in pixels.