getBitmapFromDrawable

fun getBitmapFromDrawable(@DrawableRes id: Int, context: Context = ContextHelper.getAppContext()): Bitmap

Convert drawable to bitmap.

Since

0.2.0

Parameters

context

In some cases, you may need to set context. For example, VectorDrawable's fillColor uses ?attr/colorPrimaryContainer as the attribute value. Otherwise, the fillColor will not be obtained correctly.

Throws


Convert drawable to bitmap.

Since

0.5.6

See also