om->on, seperate->separate

This commit is contained in:
iwkjosec 2024-03-26 14:02:06 +09:00 committed by GitHub
parent f5881432fe
commit 47055de4f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,14 +26,14 @@ IEnumerable<Display> displays = screenCaptureService.GetDisplays(graphicsCards.F
// Create a screen-capture for all screens you want to capture // Create a screen-capture for all screens you want to capture
IScreenCapture screenCapture = screenCaptureService.GetScreenCapture(displays.First()); IScreenCapture screenCapture = screenCaptureService.GetScreenCapture(displays.First());
// Register the regions you want to capture om the screen // Register the regions you want to capture on the screen
// Capture the whole screen // Capture the whole screen
ICaptureZone fullscreen = screenCapture.RegisterCaptureZone(0, 0, screenCapture.Display.Width, screenCapture.Display.Height); ICaptureZone fullscreen = screenCapture.RegisterCaptureZone(0, 0, screenCapture.Display.Width, screenCapture.Display.Height);
// Capture a 100x100 region at the top left and scale it down to 50x50 // Capture a 100x100 region at the top left and scale it down to 50x50
ICaptureZone topLeft = screenCapture.RegisterCaptureZone(0, 0, 100, 100, downscaleLevel: 1); ICaptureZone topLeft = screenCapture.RegisterCaptureZone(0, 0, 100, 100, downscaleLevel: 1);
// Capture the screen // Capture the screen
// This should be done in a loop on a seperate thread as CaptureScreen blocks if the screen is not updated (still image). // This should be done in a loop on a separate thread as CaptureScreen blocks if the screen is not updated (still image).
screenCapture.CaptureScreen(); screenCapture.CaptureScreen();
// Do something with the captured image - e.g. access all pixels (same could be done with topLeft) // Do something with the captured image - e.g. access all pixels (same could be done with topLeft)