private void tsmiUpload_Click(object sender, EventArgs e) { if (pbQRCode.Image != null) { Image img = (Image)pbQRCode.Image.Clone(); UploadManager.UploadImage(img); } }
private void tsmiUpload_Click(object sender, EventArgs e) { if (pbQRCode.Image != null) { Bitmap bmp = (Bitmap)pbQRCode.Image.Clone(); UploadManager.UploadImage(bmp); } }
public static Image AnnotateImage(Image img, string imgPath) { return(ImageHelpers.AnnotateImage(img, imgPath, !Program.IsSandbox, Program.PersonalPath, x => Program.MainForm.InvokeSafe(() => ClipboardHelpers.CopyImage(x)), x => Program.MainForm.InvokeSafe(() => UploadManager.UploadImage(x)), (x, filePath) => Program.MainForm.InvokeSafe(() => ImageHelpers.SaveImage(x, filePath)), (x, filePath) => { string newFilePath = null; Program.MainForm.InvokeSafe(() => newFilePath = ImageHelpers.SaveImageFileDialog(x, filePath)); return newFilePath; })); }
public static void AnnotateImageUsingShareX(Image img, string filePath, TaskSettings taskSettings = null) { if (img == null && File.Exists(filePath)) { img = ImageHelpers.LoadImage(filePath); } if (img != null) { using (img) { RegionCaptureTasks.AnnotateImage(img, filePath, taskSettings.CaptureSettingsReference.SurfaceOptions, x => UploadManager.RunImageTask(x, taskSettings), (x, newFilePath) => ImageHelpers.SaveImage(x, newFilePath), (x, newFilePath) => ImageHelpers.SaveImageFileDialog(x, newFilePath), x => ClipboardHelpers.CopyImage(x), x => UploadManager.UploadImage(x), x => PrintImage(x)); } } }
private void tsmiTestFileUpload_Click(object sender, EventArgs e) { UploadManager.UploadImage(Resources.Test, ImageDestination.FileUploader); }