drawableToBitmap

fun drawableToBitmap(drawable: Drawable?, @Px size: Int): Bitmap?

Creates a Bitmap from a drawable with a specific size specs.

Return

A new created Bitmap.

Parameters

drawable

A drawable should be created as Bitmap.

size

A desired of the new Bitmap.