decodeSampledBitmapFromStream

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

inputStream

A stream to the remote image

imageMetadata

Metadata about the source image.

destinationWidth

The width of the destination view in pixels.

destinationHeight

The height of the destination view in pixels.