fromBytes

expect fun fromBytes(bytes: ByteArray): LiteRtImage

Decodes an image from its encoded byte representation.

Supported image formats depend on the underlying platform implementation (for example PNG or JPEG).

Return

A decoded LiteRtImage.

Parameters

bytes

The encoded image bytes.

Throws

If the image cannot be decoded.