def get_display_profile(handle=None):
 if (sys.platform == 'win32'):
  from PIL import ImageWin
  if isinstance(handle, ImageWin.HDC):
   profile = core.get_display_profile_win32(handle, 1)
  else:
   profile = core.get_display_profile_win32((handle or 0))
 else:
  try:
   get = _imagingcms.get_display_profile
  except AttributeError:
   return None
  else:
   profile = get()
 return ImageCmsProfile(profile)

def get_display_profile ( handle = None ) : if ( sys . platform == 'win32' ) : from PIL import ImageWin if isinstance ( handle , ImageWin . HDC ) : profile = core . get_display_profile_win32 ( handle , 1 ) else : profile = core . get_display_profile_win32 ( ( handle or 0 ) ) else : try : get = _imagingcms . get_display_profile except AttributeError : return None else : profile = get ( ) return ImageCmsProfile ( profile )
fetches the profile for the current display device .