-
-
Notifications
You must be signed in to change notification settings - Fork 111
Example code seems to be wrong #21
Copy link
Copy link
Closed
Labels
Description
https://python-mss.readthedocs.io/en/dev/examples.html#playing-with-pixels
In this example, sct.monitor is passed directly to grab method.
In osx, grab changes a value of monitor param. As a result of it, the value of sct.monitor is also changed because python passes reference of dict rather than copying it.
(https://github.com/BoboTiG/python-mss/blob/master/mss/darwin.py#L182)
I think it's better to copy the dict before passing it to grab.
sct_img = sct.grab(sct.monitors[1].copy())
Reactions are currently unavailable