I’m attempting to make use of mss to seize a portion of my display utilizing the next code:
import mss import cv2 import numpy as np monitor_region = { "high": 810, "left": 1070, "width": 660, "top": 300 } def get_frame(display_frame=False): with mss.mss() as sct: # Seize a single body img = sct.seize(monitor_region) # Convert to NumPy array and show body = np.array(img) # print(body) # print("body dim = ", body.form) if display_frame: cv2.imshow("Captured Area", body) cv2.waitKey(0) cv2.destroyAllWindows()
When operating, my mac retains prompting for permission and
I’ve to click on permit for each request.
Sadly, this is not only a one-time factor, it occurs for each screenshot request I make. This isn’t possible when I’m making a number of requests. Therefore, I’m on the lookout for a technique to disable this safety test.
I’ve allowed terminal full entry to the disk, and to display and audio recording in my system settings. This nonetheless did not work so I’m presently utilizing pyautogui to mechanically permit this, however that is nonetheless gradual (takes ~0.2 seconds to do away with) for my software.
I’m anticipating an answer to information me to disable the above safety test.
Is it attainable to remove additional requests?