def display_check(_screen): displays = img_proc.get_monitor_screenshots() try: displays[int(_screen.display_index)] except IndexError as e: write_config('Light Settings', 'display_index', 0) _screen.display_index = 0 return
def display_check(_screen): displays = img_proc.get_monitor_screenshots() try: displays[int(_screen.display_index)] except IndexError as e: write_config('Light Settings', 'display_index', 0) _screen.display_index = 0 return
def display_check(_screen): displays = img_proc.get_monitor_screenshots() try: displays[int(_screen.display_index)] except IndexError as e: print 'Can\'t find display index, switching to default' write_config('Light Settings', 'display_index', 0) _screen.display_index = 0 return
def get_multi_monitor_screenshots(): imgs = img_proc.get_monitor_screenshots() screenshots = [] for img in imgs: tmp = StringIO.StringIO() img.save(tmp, format="PNG") b64_data = tmp.getvalue().encode('base64') screenshots.append(b64_data) return screenshots
def get_multi_monitor_screenshots(): imgs = img_proc.get_monitor_screenshots() screenshots = [] for img in imgs: tmp = StringIO.StringIO() img.save(tmp, format="PNG") b64_data = tmp.getvalue().encode('base64') screenshots.append(b64_data) return screenshots