decode Image
Decode an image file from the given bytes. The bytes are for a compressed image format such as PNG or JPEG. The decoded image is stored on the CommandServer.
Images may be used to supply a referenced asset in a Rive file with registerImage or used for data binding (forthcoming).
Return
A handle to the decoded image.
Parameters
bytes
The bytes of the image file to decode.
Throws
If the image could not be decoded, e.g. if the bytes are not a valid image.
If the CommandQueue has been released.
If the coroutine is cancelled before the operation completes.