From 9fb0087ec27e2b90ed59d2c698d5320d827db1c5 Mon Sep 17 00:00:00 2001 From: axt-one Date: Tue, 26 Apr 2022 18:04:08 +0900 Subject: [PATCH] modified screencapture option in ImageGrab.grab() --- src/PIL/ImageGrab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index 8bd14d331..eb21ac399 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -33,7 +33,7 @@ def grab(bbox=None, include_layered_windows=False, all_screens=False, xdisplay=N args = ["screencapture"] if bbox: left, top, right, bottom = bbox - args += ["-R", f"{left},{right},{right-left},{bottom-top}"] + args += ["-R", f"{left},{top},{right-left},{bottom-top}"] subprocess.call(args + ["-x", filepath]) im = Image.open(filepath) im.load()