drawableToBitmap

fun drawableToBitmap(drawable: Drawable, width: Int = drawable.intrinsicHeight, height: Int = drawable.intrinsicHeight): Bitmap?

Converts a drawable into a bitmap.

Parameters

width

The desired bitmap width output.

height

The desired bitmap height output.