toImageBitmap

fun Painter.toImageBitmap(width: Int, height: Int, alpha: Float = 1.0f, colorFilter: ColorFilter? = null): ImageBitmap

Converts Painter to ImageBitmap with desired width, height, alpha and colorFilter