From cbcabda363c1641e1c9f716ba4b9f11b50e77e97 Mon Sep 17 00:00:00 2001 From: KenwoodFox Date: Thu, 7 Apr 2022 08:39:57 -0400 Subject: [PATCH] more magic --- Software/houston/RobotStreamer.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Software/houston/RobotStreamer.py b/Software/houston/RobotStreamer.py index e5eab18..5c72491 100644 --- a/Software/houston/RobotStreamer.py +++ b/Software/houston/RobotStreamer.py @@ -1,12 +1,16 @@ from Xlib import display, X from PIL import Image -W,H = 200,200 +# 580 + +W,H = 580,620 +x,y = 0, 0 + dsp = display.Display(':0') try: root = dsp.screen().root - raw = root.get_image(0, 0, W,H, X.ZPixmap, 0xffffffff) - image = Image.frombytes("RGB", (W, H), raw.data, "raw", "BGRX") + raw = root.get_image(x, y, W,H, X.ZPixmap, 0xffffffff) + image = Image.frombytes("RGB", (W-x, H-y), raw.data, "raw", "BGRX") image.save('image.png') finally: dsp.close()