private static void StartStreaming(Protos.Job job) { _screenCaptureServiceToken = new CancellationTokenSource(); _screenCaptureService = new ScreenCaptureService(NewBitmap); _screenCaptureService.StartCaptureAsync(_screenCaptureServiceToken.Token); Console.WriteLine("new job request: start streaming"); }
private static void Main(string[] args) { var screenCap = new ScreenCaptureService(); var ocr = new OcrService(); while (true) { var bitmap = screenCap.CaptureScreenshot(); var text = ocr.ProcessImage(new MemoryStream(bitmap)); Console.WriteLine(text); Thread.Sleep(5000); } }
public void CreateFullCaptureAreaShot() { // First capture a screenshot before the creation of our own window DesktopRectangle = SystemInformation.VirtualScreen; OriginalScreenBitmap = ScreenCaptureService.FullScreenshotAsBitmap(); }