writePng function
Writes an Image object to a PNG file at the specified path.
Parameters:
- path: The file system path where the PNG should be saved
- image: The
Imageobject to be written
Implementation
Future<void> writePng(String path, Image image) async {
File(path).writeAsBytes(await encodePng(image));
}