Apply suggestions from code review

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Yan-Ke Guo 2025-07-07 16:29:38 +08:00 committed by GitHub
parent d6dcd803c7
commit e73e92530c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,8 +56,7 @@ def grab(
if bbox: if bbox:
# manual crop for windowed mode # manual crop for windowed mode
if window: if window:
left, top, right, bottom = bbox im_cropped = im.crop(bbox)
im_cropped = im.crop((left, top, right, bottom))
im.close() im.close()
return im_cropped return im_cropped
else: else: