You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In MacOS, turning on pixel doubling will cause a difference between the real resolution and the display resolution, which will affect the screenshots of ImageGrab.
For me, my monitor's real resolution is 3840x2160, after pixel doubling, it becomes 1920x1080, so the use of ImageGrab.grab(bbox=(x1, y1, x2, y2)) caused PIL.UnidentifiedImageError.
To solve the problem,
Check your monitor's real resolution. (For me is 3840x2160)
Check your displayed resolution. (For me is 1920x1080)
I use ImageGrab.grab() for whole screenshot, then crop it.
gui.py, line 266
factor=3840/1920# repalced with your real resolution / displayed resolutionimg=ImageGrab.grab()
img=img.crop((x1*factor, y1*factor, x2*factor, y2*factor))
The text was updated successfully, but these errors were encountered:
In MacOS, turning on pixel doubling will cause a difference between the real resolution and the display resolution, which will affect the screenshots of ImageGrab.
For me, my monitor's real resolution is 3840x2160, after pixel doubling, it becomes 1920x1080, so the use of
ImageGrab.grab(bbox=(x1, y1, x2, y2))
causedPIL.UnidentifiedImageError
.To solve the problem,
ImageGrab.grab()
for whole screenshot, then crop it.gui.py
, line 266The text was updated successfully, but these errors were encountered: