from Bitmap
fun fromBitmap(bitmap: Bitmap, rendererType: RendererType = Rive.defaultRendererType): RiveRenderImage
Create a RiveRenderImage from a Bitmap. Ensures ARGB_8888 software bitmap, copying if not, and forwards to fromARGBInts.
The caller is in charge of the ownership of this NativeObject. It must be freed by calling release.
The bitmap supplied is given directly to the canvas when using the Canvas renderer, so ensure that it is not recycled while in use by Rive.
Return
The constructed RiveRenderImage.
Parameters
bitmap
The source bitmap. Must not be recycled.
renderer Type
The renderer for this image. This must match the renderer for the RiveAnimationView using this.
Throws
if the bitmap is recycled.
if the bitmap could not be copied to ARGB_8888.