Future<Image> buildImageBytes(Uint8List bytes) async { final codec = await instantiateImageCodec(bytes); final frameInfo = await codec.getNextFrame(); return frameInfo.image; }