renderToImage

fun renderToImage(page: <Error class: unknown class>, scale: Double = 1.0, background: Int = Color.WHITE): Image

Render page into a freshly-allocated Skia Image. The caller owns the returned object and should call close() (or use encodeToPng) once done — Skia images hold off-heap memory.