ResourceBitmapDecoder

open class ResourceBitmapDecoder : ResourceDecoder<T, Z>

Decodes Bitmaps from resource ids.

The framework will decode some resources as Drawables that do not wrap s. This decoder will attempt to return a Bitmap for those Drawables anyway by drawing the Drawable to a Canvass using the Drawable's intrinsic bounds or the dimensions provided to decode.

For non-BitmapDrawables that return <= 0 for getIntrinsicWidth and/or getIntrinsicHeight, this decoder will fail if the width and height provided to decode are SIZE_ORIGINAL.

Constructors

Link copied to clipboard
open fun ResourceBitmapDecoder(drawableDecoder: ResourceDrawableDecoder, bitmapPool: BitmapPool)

Functions

Link copied to clipboard
open fun decode(    source: Uri,     width: Int,     height: Int,     options: Options): Resource<Bitmap>
Returns a decoded resource from the given data or null if no resource could be decoded.
Link copied to clipboard
open fun handles(source: Uri, options: Options): Boolean
Returns true if this decoder is capable of decoding the given source with the given options, and false otherwise.