mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-04 11:53: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"]
|
args = ["screencapture"]
|
||||||
if bbox:
|
if bbox:
|
||||||
left, top, right, bottom = 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])
|
subprocess.call(args + ["-x", filepath])
|
||||||
im = Image.open(filepath)
|
im = Image.open(filepath)
|
||||||
im.load()
|
im.load()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user