protected virtual Bitmap PaintMap(InnerMap map) { using var stream = new MemoryStream(); map.ExportToImage(stream, System.Drawing.Imaging.ImageFormat.Png); stream.Seek(0, SeekOrigin.Begin); var image = new Bitmap(stream); return(image); }