public static void OpenOCR(TaskSettings taskSettings = null) { if (taskSettings == null) { taskSettings = TaskSettings.GetDefaultTaskSettings(); } using (Image img = RegionCaptureHelpers.GetRegionImage(taskSettings.CaptureSettings.SurfaceOptions)) { if (img != null) { using (Stream stream = SaveImage(img, EImageFormat.PNG)) { if (stream != null) { using (OCRSpaceForm form = new OCRSpaceForm(stream, "ShareX.png")) { form.Language = Program.Settings.OCRLanguage; form.ShowDialog(); Program.Settings.OCRLanguage = form.Language; } } } } } }
private void DoOCR() { if (Data != null && Info.DataType == EDataType.Image) { using (OCRSpaceForm form = new OCRSpaceForm(Data, Info.FileName)) { form.Language = Program.Settings.OCRLanguage; form.ShowDialog(); Program.Settings.OCRLanguage = form.Language; } } }
public static void OpenOCR() { using (Image img = RegionCaptureHelpers.GetRegionImage()) { if (img != null) { using (Stream stream = SaveImage(img, EImageFormat.PNG)) { if (stream != null) { using (OCRSpaceForm form = new OCRSpaceForm(stream, "ShareX.png")) { form.Language = Program.Settings.OCRLanguage; form.ShowDialog(); Program.Settings.OCRLanguage = form.Language; } } } } } }