fromARGBInts

fun fromARGBInts(pixels: IntArray, width: Int, height: Int, rendererType: RendererType = Rive.defaultRendererType, premultiplied: Boolean = false): RiveRenderImage

Creates a RiveRenderImage from ARGB8888 packed pixel integers, matching Android Bitmap.getPixels.

The int array must be exactly width * height elements.

The caller is in charge of the ownership of this NativeObject. It must be freed by calling release.

Return

The constructed RiveRenderImage.

Parameters

pixels

ARGB8888 packed pixel integers.

width

The width of the image in pixels.

height

The height of the image in pixels.

rendererType

The renderer for this image. This must match the renderer for the RiveAnimationView using this.

premultiplied

Whether your RGB pixels are already multiplied by alpha. If false (default), the native layer will premultiply RGB by alpha for you.

Throws

if the pixel array is not the correct size.