mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Merge pull request #6244 from axt-one/fix-darwin-screencapture-bug
Corrected screencapture argument in ImageGrab.grab()
This commit is contained in:
commit
bb879d7b41
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user