void CopyImageToClipboardToolStripMenuItemClick(object sender, System.EventArgs e)
 {
     try
     {
         ImageOutput.PrepareClipboardObject();
         ImageOutput.CopyToClipboard(surface.GetImageForExport());
         updateStatusLabel(lang.GetString("editor_storedtoclipboard"));
     }
     catch (Exception)
     {
         updateStatusLabel(lang.GetString("editor_clipboardfailed"));
     }
 }
        void CaptureImage(Image img)
        {
            DoCaptureFeedback();
            this.Hide();
            string fullPath = null;

            ImageOutput.PrepareClipboardObject();
            if ((conf.Output_Destinations & ScreenshotDestinations.FileDefault) == ScreenshotDestinations.FileDefault)
            {
                string filename = FilenameHelper.GetFilenameFromPattern(conf.Output_File_FilenamePattern, conf.Output_File_Format);
                fullPath = Path.Combine(conf.Output_File_Path, filename);
                ImageOutput.Save(img, fullPath);
            }
            if ((conf.Output_Destinations & ScreenshotDestinations.FileWithDialog) == ScreenshotDestinations.FileWithDialog)
            {
                fullPath = ImageOutput.SaveWithDialog(img);
            }
            if ((conf.Output_Destinations & ScreenshotDestinations.Clipboard) == ScreenshotDestinations.Clipboard)
            {
                ImageOutput.CopyToClipboard(img);
            }
            if ((conf.Output_Destinations & ScreenshotDestinations.Printer) == ScreenshotDestinations.Printer)
            {
                new PrintHelper(img).PrintWithDialog();
            }
            if ((conf.Output_Destinations & ScreenshotDestinations.Editor) == ScreenshotDestinations.Editor)
            {
                ImageEditorForm editor = new ImageEditorForm();
                editor.SetImage(img);
                if (fullPath != null)
                {
                    editor.SetImagePath(fullPath);
                }
                editor.Show();
            }
        }