rememberRegisteredImage

Decode and register an image from the given bytes on the provided RiveWorker. The decoded image can only be used on the same RiveWorker it was created on.

This function is intended for use with images that are registered once, as a convenience. If you want to register multiple times, use rememberImage and ImageAsset.register instead.

The image will be deleted, unregistered, and its RiveWorker reference released when the composable leaves the composition.

Return

The Result of the image decoding and registration, which can be either loading, error, or success with the ImageHandle.

Parameters

riveWorker

The Rive worker that owns and performs operations on this image.

key

The key of the referenced image. This comes from the zip file created when exporting a Rive file.

bytes

The byte array containing the image data to decode.