Can be done with built-in MonoGame functions.
Render the canvas to a render target then call SaveToPng. For example:
DateTime now = DateTime.Now;
int year = now.Year;
int month = now.Month;
int day = now.Day;
string name = $"{year}-{month}-{day}";
string imageName = $"{name}.png";
using Stream file = File.OpenWrite(GetPath(imageName));
_r.SaveAsPng(file, _width, _height);
Was done in MotivationTracker.
Can be done with built-in MonoGame functions.
Render the canvas to a render target then call
SaveToPng. For example:Was done in MotivationTracker.