decode

abstract suspend fun decode(pool: BitmapPool, source: BufferedSource, size: Size, options: Options): DecodeResult

Decode source as a Drawable.

NOTE: Implementations are responsible for closing source when finished with it.

Parameters

pool

A BitmapPool which can be used to request Bitmap instances.

source

The BufferedSource to read from.

size

The requested dimensions for the image.

options

A set of configuration options for this request.