diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index 5cf4ab6ee83..e5b09c4dad8 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -52,9 +52,9 @@ def grab(bbox=None, include_layered_windows=False, multimonitor=False): -1, ) if bbox: - xo, yo = offset + x0, y0 = offset left, top, right, bottom = bbox - im = im.crop((left - xo, top - yo, right - xo, bottom - yo)) + im = im.crop((left - x0, top - y0, right - x0, bottom - y0)) return im