mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-24 07:40:32 +03:00
modified screencapture option in ImageGrab.grab()
This commit is contained in:
parent
bcded33cee
commit
9fb0087ec2
|
@ -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