def get_icc_info(): #maybe we shouldn't return anything if there's more than one display? info = {} try: did = CG.CGMainDisplayID() info = get_colorspace_info(CG.CGDisplayCopyColorSpace(did)) except Exception as e: log("failed to query colorspace for main display: %s", e) return info
def get_display_icc_info(): info = {} try: err, active_displays, no = CG.CGGetActiveDisplayList(99, None, None) if err == 0 and no > 0: for i, adid in enumerate(active_displays): info[i] = get_colorspace_info(CG.CGDisplayCopyColorSpace(adid)) except Exception as e: log("failed to query colorspace for active displays: %s", e) return info
def get_icc_info(): #maybe we shouldn't return anything if there's more than one display? info = {} try: from Quartz import CoreGraphics as CG #@UnresolvedImport did = CG.CGMainDisplayID() info = get_colorspace_info(CG.CGDisplayCopyColorSpace(did)) except Exception as e: log("failed to query colorspace for main display: %s", e) return info