rgbaToImg function
Creates an Image object from raw RGBA bytes.
Parameters:
- rawRgba: The raw RGBA byte data to convert
Returns a Future that completes with the created Image.
Implementation
Future<Image> rgbaToImg(Uint8List rawRgba) async {
final codec = await instantiateImageCodec(rawRgba);
return (await codec.getNextFrame()).image;
}