コード例 #1
0
ファイル: utility.py プロジェクト: peyremorgan/screenBloom
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
コード例 #2
0
ファイル: utility.py プロジェクト: digiltd/screenBloom
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
コード例 #3
0
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
コード例 #4
0
ファイル: utility.py プロジェクト: peyremorgan/screenBloom
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
コード例 #5
0
ファイル: utility.py プロジェクト: digiltd/screenBloom
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