fromImage static method
load data from an Image
Implementation
static Future<BufferImage> fromImage(Image image) async {
return BufferImage._(
(await image.toByteData(format: ImageByteFormat.rawRgba))!
.buffer
.asByteData(),
image.width,
image.height,
);
}