fromImage static method
Implementation
static Future<ImageWrapper> fromImage(ui.Image img) async {
final buffer = (await img.toByteData(format: ui.ImageByteFormat.rawRgba))!;
return ImageWrapper(buffer.buffer.asUint8List(), img.width, img.height);
}