private void SaveScreenShot() { string filePath = Utilities.SaveDialog(true); if (filePath == null) { return; } Bitmap bitmap = this.imageView.ScreenBitmap; Graphics g = Graphics.FromImage(bitmap); g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear; OnSavingScreenShot(g, new MosaicWindowEventArgs(MosaicWindow.MosaicInfo)); FreeImageAlgorithmsBitmap fib = new FreeImageAlgorithmsBitmap(bitmap); fib.ConvertTo24Bits(); g.Dispose(); bitmap.Dispose(); string extension = Path.GetExtension(filePath); if (extension != ".ics") { fib.SaveToFile(filePath); } else { IcsFile.SaveToFile(fib, filePath, true); } fib.Dispose(); }